Revision cf5923cc

View differences:

Protocol/CMakeLists.txt
16 16
# so that the generated files are found
17 17
include_directories("${PROJECT_BINARY_DIR}")
18 18

  
19
#SET(CMAKE_INSTALL_PREFIX "../../" CACHE PATH "Install path prefix" FORCE INTERNAL )
20

  
19 21
# add the Google protobuf parts
20 22
find_package(Protobuf REQUIRED)
21 23
include_directories(${PROTOBUF_INCLUDE_DIRS})
......
23 25
set (PROTOBUF_IMPORT_DIRS specification)
24 26
PROTOBUF_GENERATE_CPP(PROTO_SRCS PROTO_HDRS specification/basic_types.proto specification/eye_data.proto specification/gaze2d_data.proto specification/gaze3d_data.proto specification/messages.proto)
25 27

  
28
#this dummy list will make all header files appear if you use qtcreator to open the cmake project
29
#file(GLOB HEADER_LIST RELATIVE ${CMAKE_CURRENT_BINARY_DIR}/ *.h  )
30

  
26 31
# add the library
27 32
add_library(GazeTkProtocol STATIC src_cpp/protocol.cc ${PROTO_SRCS} ${PROTO_HDRS})
28 33
target_link_libraries(GazeTkProtocol ${PROTOBUF_LIBRARIES})
34

  
35
install(TARGETS GazeTkProtocol
36
     RUNTIME DESTINATION bin COMPONENT libraries
37
     LIBRARY DESTINATION lib COMPONENT libraries
38
     PUBLIC_HEADER DESTINATION include COMPONENT libraries
39
     ARCHIVE DESTINATION lib/static COMPONENT libraries)
40
     
41
install(DIRECTORY src_cpp/ DESTINATION include/GazeTkProtocol
42
        FILES_MATCHING PATTERN "*.h")
43
        
44
#
45
# Installing the header files.
46
# Looks a little bit complicated, the headers are generated, so we have to search
47
# for them. However, if we do so, the install command creates empty subdirs according
48
# to initial structure. By excluding them, this is prohibited. Nicer solutions welcome!
49
#
50
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ DESTINATION include/GazeTkProtocol
51
				FILES_MATCHING PATTERN "*.h"
52
				PATTERN "Win32" EXCLUDE
53
				PATTERN "GazeTkProtocol.dir" EXCLUDE
54
				PATTERN "Debug" EXCLUDE
55
				PATTERN "Release" EXCLUDE
56
				PATTERN "CMakeFiles" EXCLUDE
57
        )
58
        
Protocol/specification/logging.proto
1
syntax = "proto2";
2
//
3
// Logging
4
//
5
// Defines some logging messages
6
//
7

  
8
import "basic_types.proto";
9

  
10
message Log {
11
	required gazetk.protocol.types.Timestamp timestamp = 1; 	// Time of the creation of the log message
12
	required string source = 2; 															// Source of the log message
13
	required string content = 3;					  									// The content of the message
14
}
15

  

Also available in: Unified diff