File tree 3 files changed +16
-1
lines changed
3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 17
17
endif ()
18
18
19
19
include (GNUInstallDirs)
20
+ include (CMakePackageConfigHelpers)
20
21
21
22
set (THREADS_PREFER_PTHREAD_FLAG ON )
22
23
find_package (Threads REQUIRED)
Original file line number Diff line number Diff line change
1
+ include ("${CMAKE_CURRENT_LIST_DIR} /qthread.cmake" )
Original file line number Diff line number Diff line change @@ -156,8 +156,21 @@ install(
156
156
DESTINATION "${CMAKE_INSTALL_LIBDIR} "
157
157
COMPONENT shlib
158
158
)
159
+ configure_package_config_file("${CMAKE_CURRENT_SOURCE_DIR} /../qthread-config.cmake.in"
160
+ "${CMAKE_CURRENT_BINARY_DIR} /qthread-config.cmake"
161
+ INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR} /cmake/qthread" )
162
+ write_basic_package_version_file(
163
+ "${CMAKE_CURRENT_BINARY_DIR} /qthread-config-version.cmake"
164
+ VERSION 1.22
165
+ COMPATIBILITY SameMajorVersion)
159
166
install (
160
- DIRECTORY ${CMAKE_SOURCE_DIR} /include /qthread
167
+ FILES
168
+ "${CMAKE_CURRENT_BINARY_DIR} /qthread-config.cmake"
169
+ "${CMAKE_CURRENT_BINARY_DIR} /qthread-config-version.cmake"
170
+ DESTINATION
171
+ "${CMAKE_INSTALL_LIBDIR} /cmake/qthread" )
172
+ install (
173
+ DIRECTORY "${CMAKE_SOURCE_DIR} /include/qthread"
161
174
DESTINATION include
162
175
PATTERN "top" EXCLUDE
163
176
)
You can’t perform that action at this time.
0 commit comments