mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-03 16:49:00 +08:00
34 lines
1.1 KiB
Diff
34 lines
1.1 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 7f8572e..f42ec18 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.0)
|
|
|
|
project( enkiTS )
|
|
|
|
+include(GNUInstallDirs)
|
|
+
|
|
option( ENKITS_BUILD_C_INTERFACE "Build C interface" ON )
|
|
option( ENKITS_BUILD_EXAMPLES "Build example applications" ON )
|
|
option( ENKITS_BUILD_SHARED "Build shared library" OFF )
|
|
@@ -59,9 +61,17 @@ if( UNIX )
|
|
target_link_libraries( enkiTS ${CMAKE_THREAD_LIBS_INIT} )
|
|
endif()
|
|
|
|
+target_include_directories(enkiTS PUBLIC "$<INSTALL_INTERFACE:include>")
|
|
if( ENKITS_INSTALL )
|
|
- install(TARGETS enkiTS DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/enkiTS")
|
|
- install(FILES ${ENKITS_HEADERS} DESTINATION "${CMAKE_INSTALL_PREFIX}/include/enkiTS")
|
|
+ install(
|
|
+ TARGETS enkiTS
|
|
+ EXPORT enkiTS-config
|
|
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
|
+ install(FILES ${ENKITS_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
|
+ install(
|
|
+ EXPORT enkiTS-config
|
|
+ NAMESPACE enkiTS::
|
|
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/enkiTS)
|
|
endif()
|
|
|
|
if( UNIX )
|