summaryrefslogtreecommitdiff
blob: 6782b05abf785288ae34129f7807c3ebea929acd (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
Install to share, it's header-only

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -105,7 +105,7 @@ target_include_directories(sol2 ${sol2-system-include}
 configure_package_config_file(
 	cmake/sol2-config.cmake.in
 	"${CMAKE_CURRENT_BINARY_DIR}/cmake/sol2-config.cmake"
-	INSTALL_DESTINATION lib/cmake/sol2
+	INSTALL_DESTINATION ${CMAKE_INSTALL_DATADIR}/cmake/sol2
 	NO_CHECK_REQUIRED_COMPONENTS_MACRO)
 
 write_basic_package_version_file(
@@ -121,7 +121,7 @@ if(SOL2_ENABLE_INSTALL)
 
 	install(EXPORT sol2
 		FILE sol2-targets.cmake
-		DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/sol2")
+		DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/sol2")
 
 	install(DIRECTORY include/sol
 		DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
@@ -129,7 +129,7 @@ if(SOL2_ENABLE_INSTALL)
 	install(FILES
 		"${CMAKE_CURRENT_BINARY_DIR}/cmake/sol2-config.cmake"
 		"${CMAKE_CURRENT_BINARY_DIR}/cmake/sol2-config-version.cmake"
-		DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/sol2")
+		DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/sol2")
 endif()
 
 # # # sol2 Library - Single header target