@@ -16,62 +16,70 @@ message("${CMAKE_CXX_FLAGS_RELEASE}")
16
16
find_package (Boost REQUIRED)
17
17
find_package (Eigen3 REQUIRED)
18
18
find_package (Ceres REQUIRED)
19
- find_package (PCL 1.6 REQUIRED)
20
- add_definitions (${PCL_DEFINITIONS} )
21
-
22
- set (IMU_TK_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR} /include PARENT_SCOPE)
23
- set (IMU_TK_LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR} /lib PARENT_SCOPE)
24
- set (IMU_TK_LIBS imu_tk PARENT_SCOPE)
25
19
26
20
include_directories (./include
27
21
/usr/include
28
22
${Boost_INCLUDE_DIRS}
29
23
${EIGEN_INCLUDE_DIR}
30
- ${CERES_INCLUDE_DIRS}
31
- ${PCL_INCLUDE_DIRS} )
24
+ ${CERES_INCLUDE_DIRS} )
25
+
26
+ #Vis3D
27
+ find_package (Qt4 COMPONENTS QtCore QtGui QtOpenGL REQUIRED )
28
+ find_package (OpenGL REQUIRED)
29
+ find_package (GLUT REQUIRED)
30
+
31
+ include_directories ( ${OPENGL_INCLUDE_DIRS}
32
+ ${GLUT_INCLUDE_DIRS}
33
+ ${CMAKE_CURRENT_BINARY_DIR} )
34
+
35
+ set (IMU_TK_VIS_EXTRA_SOURCES
36
+ ./src/vis_extra/gl_camera.cpp
37
+ ./src/vis_extra/opengl_3d_scene.cpp )
38
+ set (IMU_TK_VIS_EXTRA_HEADERS
39
+ ./include /imu_tk/vis_extra/opengl_3d_scene.h )
40
+
41
+ qt4_wrap_cpp(IMU_TK_VIS_EXTRA_HEADERS_MOC ${IMU_TK_VIS_EXTRA_HEADERS} )
42
+
43
+ include (${QT_USE_FILE} )
44
+ add_definitions (${QT_DEFINITIONS} )
45
+
46
+ aux_source_directory ( ./src IMU_TK_CORE_SRC )
47
+ set ( IMU_TK_SRC ${IMU_TK_CORE_SRC} ${IMU_TK_VIS_EXTRA_HEADERS_MOC} ${IMU_TK_VIS_EXTRA_SOURCES} )
48
+
49
+ add_library (imu_tk ${IMU_TK_SRC} )
50
+ set_target_properties (imu_tk PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR} /lib)
32
51
33
-
34
- aux_source_directory ( src IMU_TK_SRC )
52
+ set (IMU_TK_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR} /include CACHE STRING "imu_tk include directories" )
53
+ set (IMU_TK_LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR} /lib CACHE STRING "imu_tk libraries directories" )
54
+ set (IMU_TK_LIBS imu_tk ${CERES_LIBRARIES} ${QT_LIBRARIES} ${OPENGL_LIBRARIES} ${GLUT_LIBRARY}
55
+ CACHE STRING "imu_tk libraries" )
35
56
36
- add_library (imu_tk STATIC ${IMU_TK_SRC} )
37
- target_link_libraries ( imu_tk ${PCL_LIBRARIES} )
38
- set_target_properties (imu_tk PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR} /lib)
57
+ message ( "${IMU_TK_LIBS} " )
39
58
40
59
if ( BUILD_IMU_TK_EXAMPLES )
41
60
42
61
add_executable (test_imu_calib apps/test_imu_calib.cpp)
43
- target_link_libraries ( test_imu_calib
44
- imu_tk
45
- ${CERES_LIBRARIES} )
62
+ target_link_libraries ( test_imu_calib ${IMU_TK_LIBS} )
46
63
47
64
set_target_properties ( test_imu_calib PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR} /bin)
48
65
49
66
add_executable (test_phone_calib apps/test_phone_calib.cpp)
50
- target_link_libraries ( test_phone_calib
51
- imu_tk
52
- ${CERES_LIBRARIES} )
67
+ target_link_libraries ( test_phone_calib ${IMU_TK_LIBS} )
53
68
54
69
set_target_properties ( test_phone_calib PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR} /bin)
55
70
56
-
57
71
add_executable (test_imu_calib2 apps/test_imu_calib2.cpp)
58
- target_link_libraries ( test_imu_calib2
59
- imu_tk
60
- ${CERES_LIBRARIES} )
72
+ target_link_libraries ( test_imu_calib2 ${IMU_TK_LIBS} )
61
73
62
74
set_target_properties ( test_imu_calib2 PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR} /bin)
63
75
64
76
add_executable (test_imu_calib3 apps/test_imu_calib3.cpp)
65
- target_link_libraries ( test_imu_calib3
66
- imu_tk
67
- ${CERES_LIBRARIES} )
77
+ target_link_libraries ( test_imu_calib3 ${IMU_TK_LIBS} )
68
78
69
79
set_target_properties ( test_imu_calib3 PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR} /bin)
70
80
71
81
add_executable (test_integration apps/test_integration.cpp)
72
- target_link_libraries ( test_integration
73
- imu_tk
74
- ${CERES_LIBRARIES} )
82
+ target_link_libraries ( test_integration ${IMU_TK_LIBS} )
75
83
76
84
set_target_properties ( test_integration PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR} /bin)
77
85
0 commit comments