summarylogtreecommitdiffstats
path: root/add_cmake_components.patch
blob: c55ab4fceb7061ccd4f027ca25b3fc799b597fea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
--- LASlib/src/CMakeLists.txt
+++ LASlib/src/CMakeLists.txt

@@ -103,16 +103,16 @@ Add a laslib component for library outputs
 endif()
 
-install(FILES ${LAS_INCLUDES} DESTINATION include/LASlib)
+install(FILES ${LAS_INCLUDES} COMPONENT laslib DESTINATION include/LASlib)
 
 if (MSVC)
 	foreach( OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES} )
 		install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../lib/${OUTPUTCONFIG} DESTINATION lib/LASlib)
 	endforeach( OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES )
 else()
-	install(TARGETS LASlib EXPORT laslib-targets
+	install(TARGETS LASlib COMPONENT laslib EXPORT laslib-targets
 		ARCHIVE DESTINATION lib/LASlib
 		LIBRARY DESTINATION lib/LASlib
 		RUNTIME DESTINATION lib/LASlib)
-	install(EXPORT laslib-targets DESTINATION lib/cmake/LASlib)
+	install(EXPORT laslib-targets COMPONENT laslib DESTINATION lib/cmake/LASlib)
-	install(FILES ${CMAKE_SOURCE_DIR}/LASlib/src/laslib-config.cmake DESTINATION lib/cmake/LASlib)
+	install(FILES ${CMAKE_SOURCE_DIR}/LASlib/src/laslib-config.cmake COMPONENT laslib DESTINATION lib/cmake/LASlib)
 endif(MSVC)

--- src/CMakeLists.txt
+++ src/CMakeLists.txt

@@ -33,7 +33,7 @@ Add a lastools component for compiled tools
 foreach(TARGET ${ALL_TARGETS})
 	set_property(TARGET ${TARGET} PROPERTY CXX_STANDARD 14)
 	target_link_libraries(${TARGET} LASlib)
 	set_target_properties(${TARGET} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../bin64)
 	set_target_properties(${TARGET} PROPERTIES OUTPUT_NAME ${TARGET}64)
-	install(TARGETS ${TARGET} RUNTIME DESTINATION bin)
+	install(TARGETS ${TARGET} COMPONENT lastools RUNTIME DESTINATION bin)
 endforeach(TARGET)