mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-01 07:08:59 +08:00
2be25464ed
* [nsync] Export cmake targets * version * Forgot the patch * version * Also export the include path * version
37 lines
1.2 KiB
Diff
37 lines
1.2 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 328f9b6..6a71b5b 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -41,6 +41,9 @@ function (set_cpp_target tgtname files)
|
|
"${PROJECT_SOURCE_DIR}/platform/c++11.futex"
|
|
)
|
|
endif ()
|
|
+
|
|
+ target_include_directories("${tgtname}" PUBLIC $<INSTALL_INTERFACE:include>)
|
|
+
|
|
|
|
target_compile_definitions ("${tgtname}" PRIVATE "${NSYNC_CPP_DEFINITIONS}")
|
|
|
|
@@ -399,14 +402,19 @@ endif ()
|
|
# By default, install nsync always
|
|
# set (CMAKE_SKIP_INSTALL_ALL_DEPENDENCY ON)
|
|
|
|
-install (TARGETS nsync
|
|
+install (TARGETS nsync EXPORT unofficial-nsyncConfig
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT RuntimeLibraries
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Development)
|
|
|
|
-install (TARGETS nsync_cpp OPTIONAL
|
|
+install (TARGETS nsync_cpp OPTIONAL EXPORT unofficial-nsyncConfig
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT RuntimeLibraries
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Development)
|
|
|
|
+install(EXPORT unofficial-nsyncConfig
|
|
+ NAMESPACE unofficial::nsync::
|
|
+ DESTINATION share/unofficial-nsync
|
|
+)
|
|
+
|
|
set (NSYNC_INCLUDES
|
|
"public/nsync.h"
|
|
"public/nsync_atomic.h"
|