Commit bf700d1 1 parent 2ede15d commit bf700d1 Copy full SHA for bf700d1
File tree 5 files changed +13
-4
lines changed
5 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 90
90
# .. variable:: PROJECT_USE_CMAKE_EXPORT
91
91
#
92
92
# This tells jrl-cmakemodules that you are using export functionalities so it
93
- # will hook the installation of your configuration files. Defaults to false
93
+ # will hook the installation of your configuration files. Defaults to true
94
94
#
95
95
# .. variable:: PROJECT_EXPORT_NO_TARGET
96
96
#
Original file line number Diff line number Diff line change @@ -272,7 +272,7 @@ endfunction(GENERATE_CONFIGURATION_HEADER_V2)
272
272
#
273
273
macro (_SETUP_PROJECT_HEADER_FINALIZE)
274
274
# If the header list is set, install it.
275
- if (DEFINED ${PROJECT_NAME} _HEADERS)
275
+ if (DEFINED ${PROJECT_NAME} _HEADERS AND NOT BUILD_ONLY_PYTHON_INTERFACE )
276
276
HEADER_INSTALL(${${PROJECT_NAME} _HEADERS})
277
277
endif (DEFINED ${PROJECT_NAME} _HEADERS)
278
278
endmacro (_SETUP_PROJECT_HEADER_FINALIZE)
Original file line number Diff line number Diff line change @@ -47,8 +47,12 @@ cmake_dependent_option(
47
47
BUILD_DOCUMENTATION
48
48
OFF
49
49
)
50
- option (INSTALL_GENERATED_HEADERS "Generate and install standard headers" ON )
51
- option (INSTALL_PKG_CONFIG_FILE "Generate and install standard .pc file" ON )
50
+
51
+ option (BUILD_PYTHON_INTERFACE "Build the python bindings" ON )
52
+ cmake_dependent_option(BUILD_ONLY_PYTHON_INTERFACE "Build only the python bindings" OFF BUILD_PYTHON_INTERFACE OFF )
53
+ cmake_dependent_option(INSTALL_GENERATED_HEADERS "Generate and install standard headers" ON "NOT BUILD_ONLY_PYTHON_INTERFACE" OFF )
54
+ cmake_dependent_option(INSTALL_PKG_CONFIG_FILE "Generate and install standard .pc file" ON "NOT BUILD_ONLY_PYTHON_INTERFACE" OFF )
55
+ cmake_dependent_option(PROJECT_USE_CMAKE_EXPORT "Generate and install CMake exports" ON "NOT BUILD_ONLY_PYTHON_INTERFACE" OFF )
52
56
53
57
include (CTest)
54
58
enable_testing ()
Original file line number Diff line number Diff line change 13
13
# You should have received a copy of the GNU General Public License along with
14
14
# this program. If not, see <http://www.gnu.org/licenses/>.
15
15
16
+
16
17
# .rst: .. command:: FINDPYTHON
17
18
#
18
19
# Find python interpreter and python libs. Arguments are passed to the
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ macro(_install_project_ros2_ament_files)
22
22
if (BUILDING_ROS2_PACKAGE)
23
23
message (STATUS "Create files for AMENT (ROS 2)" )
24
24
# Allows Colcon to find non-Ament packages when using workspace underlays
25
+ if (NOT BUILD_ONLY_PYTHON_INTERFACE)
25
26
file (
26
27
WRITE
27
28
${CMAKE_CURRENT_BINARY_DIR} /share/ament_index/resource_index/packages/${PROJECT_NAME}
@@ -42,6 +43,8 @@ macro(_install_project_ros2_ament_files)
42
43
${CMAKE_CURRENT_BINARY_DIR} /share/${PROJECT_NAME} /hook/ament_prefix_path.dsv
43
44
DESTINATION share/${PROJECT_NAME} /hook
44
45
)
46
+ endif ()
47
+ if (BUILD_PYTHON_INTERFACE)
45
48
file (
46
49
WRITE
47
50
${CMAKE_CURRENT_BINARY_DIR} /share/${PROJECT_NAME} /hook/python_path.dsv
@@ -52,5 +55,6 @@ macro(_install_project_ros2_ament_files)
52
55
${CMAKE_CURRENT_BINARY_DIR} /share/${PROJECT_NAME} /hook/python_path.dsv
53
56
DESTINATION share/${PROJECT_NAME} /hook
54
57
)
58
+ endif ()
55
59
endif (BUILDING_ROS2_PACKAGE)
56
60
endmacro (_install_project_ros2_ament_files)
You can’t perform that action at this time.
0 commit comments