mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-26 06:40:51 +08:00
41 lines
1.3 KiB
Diff
41 lines
1.3 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index ace2879..15c7f44 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 2.8)
|
|
project(tiny-process-library)
|
|
|
|
if(MSVC)
|
|
+ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
|
add_definitions(/D_CRT_SECURE_NO_WARNINGS)
|
|
else()
|
|
add_compile_options(-std=c++11 -Wall -Wextra)
|
|
@@ -23,7 +24,7 @@ endif()
|
|
find_package(Threads REQUIRED)
|
|
|
|
target_link_libraries(tiny-process-library ${CMAKE_THREAD_LIBS_INIT})
|
|
-target_include_directories(tiny-process-library PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
|
+target_include_directories(tiny-process-library PUBLIC $<INSTALL_INTERFACE:include>)
|
|
|
|
option(BUILD_TESTING OFF)
|
|
|
|
@@ -34,7 +35,17 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
|
|
|
|
set(BUILD_TESTING ON)
|
|
|
|
- install(TARGETS tiny-process-library DESTINATION lib)
|
|
+ install(TARGETS tiny-process-library
|
|
+ EXPORT ${PROJECT_NAME}-config
|
|
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
+ )
|
|
+ install(EXPORT ${PROJECT_NAME}-config
|
|
+ FILE unofficial-${PROJECT_NAME}-config.cmake
|
|
+ NAMESPACE unofficial::${PROJECT_NAME}::
|
|
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/unofficial-${PROJECT_NAME}
|
|
+ )
|
|
install(FILES process.hpp DESTINATION include)
|
|
endif()
|
|
|