1
1
#
2
- # (C) Copyright 2011-2021 Johns Hopkins University (JHU), All Rights Reserved.
2
+ # (C) Copyright 2011-2023 Johns Hopkins University (JHU), All Rights Reserved.
3
3
#
4
4
# --- begin cisst license - do not edit ---
5
5
#
9
9
#
10
10
# --- end cisst license ---
11
11
12
- cmake_minimum_required (VERSION 2.8 )
13
-
14
- project (sawControllers )
12
+ cmake_minimum_required (VERSION 3.10 )
13
+ project (sawControllers VERSION 2.1.0 )
15
14
16
15
set (CMAKE_CXX_STANDARD 14 )
17
16
set (CMAKE_CXX_STANDARD_REQUIRED ON )
18
17
set (CMAKE_CXX_EXTENSIONS OFF )
19
18
20
19
set (REQUIRED_CISST_LIBRARIES
21
20
cisstCommon
22
- cisstCommonXML
23
21
cisstVector
24
22
cisstOSAbstraction
25
23
cisstMultiTask
26
24
cisstParameterTypes
27
25
cisstRobot
28
26
cisstNumerical )
29
27
30
- find_package (cisst 1.1 .0 REQUIRED ${REQUIRED_CISST_LIBRARIES} )
28
+ find_package (cisst 1.2 .0 REQUIRED ${REQUIRED_CISST_LIBRARIES} )
31
29
32
30
if (cisst_FOUND )
33
31
34
32
# load cisst configuration
35
33
include (${CISST_USE_FILE} )
36
34
37
35
# catkin/ROS paths
38
- cisst_is_catkin_build (sawControllers_IS_CATKIN_BUILT )
39
- if (sawControllers_IS_CATKIN_BUILT )
40
- set (sawControllers_CONFIG_FILE_DIR
41
- "${CATKIN_DEVEL_PREFIX} /share/sawControllers/cmake" )
42
- set (LIBRARY_OUTPUT_PATH "${sawControllers_BINARY_DIR} /lib" )
43
- set (EXECUTABLE_OUTPUT_PATH "${CATKIN_DEVEL_PREFIX} /bin" )
44
- else ()
45
- set (sawControllers_CONFIG_FILE_DIR "${sawControllers_BINARY_DIR} " )
46
- endif ()
36
+ cisst_set_output_path ()
47
37
48
38
# create/configure file for find_package (sawControllers)
49
39
set (sawControllers_INCLUDE_DIR "${sawControllers_SOURCE_DIR} /include"
50
40
"${sawControllers_BINARY_DIR} /include" )
41
+ set (sawControllers_HEADER_DIR "${sawControllers_SOURCE_DIR} /include/sawControllers" )
51
42
set (sawControllers_LIBRARY_DIR "${LIBRARY_OUTPUT_PATH} " )
52
43
set (sawControllers_LIBRARIES sawControllers )
53
44
54
- # Set the version number
55
- set (sawControllers_VERSION_MAJOR "2" )
56
- set (sawControllers_VERSION_MINOR "0" )
57
- set (sawControllers_VERSION_PATCH "0" )
58
- set (sawControllers_VERSION "${sawControllers_VERSION_MAJOR} .${sawControllers_VERSION_MINOR} .${sawControllers_VERSION_PATCH} " )
45
+ include_directories (BEFORE ${sawControllers_INCLUDE_DIR} )
59
46
60
- # Generate sawControllersRevision.h
61
- configure_file ("${sawControllers_SOURCE_DIR} /code/sawControllersRevision.h.in"
62
- "${sawControllers_BINARY_DIR} /include/sawControllers/sawControllersRevision.h" )
47
+ if (CISST_HAS_QT )
48
+ add_subdirectory (code/Qt )
49
+ set (sawControllers_LIBRARIES ${sawControllers_LIBRARIES} sawControllersQt )
50
+ endif ()
63
51
64
- include_directories (${sawControllers_INCLUDE_DIR} )
65
- set (sawControllers_HEADER_DIR "${sawControllers_SOURCE_DIR} /include/sawControllers" )
52
+ cisst_add_config_files (sawControllers )
66
53
54
+ # create data type using the data generator
55
+ cisst_data_generator (sawControllers
56
+ "${sawControllers_BINARY_DIR} /include" # where to save the file
57
+ "sawControllers/" # sub directory for include
58
+ code/mtsPIDConfiguration.cdg )
67
59
set (HEADER_FILES
68
60
${sawControllers_HEADER_DIR} /osaGravityCompensation.h
69
61
${sawControllers_HEADER_DIR} /osaPDGC.h
@@ -86,39 +78,27 @@ if (cisst_FOUND)
86
78
code/mtsPDGC.cpp
87
79
code/mtsPID.cpp )
88
80
89
- add_library (sawControllers ${HEADER_FILES} ${SOURCE_FILES} )
90
- cisst_target_link_libraries (sawControllers ${REQUIRED_CISST_LIBRARIES} )
91
- set_property (TARGET sawControllers PROPERTY FOLDER "sawControllers" )
92
-
93
- # add Qt code
94
- add_subdirectory (code/Qt )
95
- set (sawControllers_LIBRARIES ${sawControllers_LIBRARIES} ${sawControllersQt_LIBRARIES} )
96
-
97
- set (sawControllers_CMAKE_CONFIG_FILE
98
- "${sawControllers_CONFIG_FILE_DIR} /sawControllersConfig.cmake" )
81
+ add_library (sawControllers ${HEADER_FILES} ${SOURCE_FILES}
82
+ ${sawControllers_CISST_DG_SRCS}
83
+ ${sawControllers_CISST_DG_HDRS} )
99
84
100
- configure_file ( " ${CMAKE_CURRENT_SOURCE_DIR} /cmake/sawControllersConfig.cmake.in"
101
- " ${sawControllers_CONFIG_FILE_DIR} /sawControllersConfig.cmake"
102
- @ONLY )
85
+ set_target_properties ( sawControllers PROPERTIES
86
+ VERSION ${sawControllers_VERSION}
87
+ FOLDER "sawControllers" )
103
88
104
- cisst_add_config_version ("${sawControllers_CONFIG_FILE_DIR} /sawControllersConfigVersion.cmake"
105
- VERSION ${sawControllers_VERSION}
106
- DESTINATION ${CISST_CMAKE_INSTALL_SUFFIX} /saw
107
- COMPONENT sawControllers )
89
+ cisst_target_link_libraries (sawControllers ${REQUIRED_CISST_LIBRARIES} )
108
90
109
91
# Install targets for headers and library
110
92
install (DIRECTORY
111
93
${sawControllers_SOURCE_DIR} /include/sawControllers
112
94
${sawControllers_BINARY_DIR} /include/sawControllers
113
95
DESTINATION include
96
+ COMPONENT sawControllers-dev
114
97
PATTERN .svn EXCLUDE )
115
98
116
- install (TARGETS sawControllers
99
+ install (TARGETS sawControllers COMPONENT sawControllers
117
100
RUNTIME DESTINATION bin
118
101
LIBRARY DESTINATION lib
119
102
ARCHIVE DESTINATION lib )
120
103
121
- install (FILES "${sawControllers_CMAKE_CONFIG_FILE} "
122
- DESTINATION "share/sawControllers" )
123
-
124
104
endif ( cisst_FOUND )
0 commit comments