mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 03:00:19 +08:00
8641dfd9dd
* some libraries export <PackageName>LibraryDepends.cmake instead of <PackageName>Targets.cmake. Those file also need the fix of #1044 should close #4753 * prefered the general solution #4622. hopefully solved the issue within #4150 replaced the regex with something more readable (also ident is lost) should close: #4753 #4633 #4150 and maybe more * Hash vcpkg_fixup_cmake_targets.cmake * [boost] Fix use of find_package(Boost) with cache variables [socket-io-client] Fix install * reversed change back to use regex replace * [glbinding] Fix _IMPORT_PREFIX depth in *-export.cmake files * [tinyspline] Ignore warnings treated as errors * [libevent, liblemon, libpng, smpeg2, zlib] Fix apply patches * [libsodium] Fix apply patches * [folly] Link correct libraries in debug and release * [vtk] Remove unset of _IMPORT_PREFIX * [tinyspline] Do not treat warnings as errors * [smpeg2] Fix double* to int comparison * [nvtt] Define value for HAVE_UNISTD_H in MacOS * [libui] Fix MacOS X build * [zlib] Fix download URL * [qhull] Update to v7.2.1 * [podofo] Set value for HAVE_UNISTD_H in MacOS * [mongo-cxx-driver,ogre,podofo,qhull] Bump CONTROL version * [mongo-c-driver] Set _IMPORT_PREFIX * [tmxparser] Bump CONTROL version * [qhull,vxl] Bump CONTROL version
47 lines
1.4 KiB
Diff
47 lines
1.4 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index c7193fbb..50c997f8 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -152,8 +152,7 @@ add_subdirectory("common")
|
|
add_subdirectory("${_OSNAME}")
|
|
add_library(libui ${_LIBUI_SOURCES})
|
|
target_include_directories(libui
|
|
- PUBLIC .
|
|
- PRIVATE ${_LIBUI_INCLUEDIRS})
|
|
+ PUBLIC $<INSTALL_INTERFACE:include>)
|
|
target_compile_definitions(libui
|
|
PRIVATE ${_LIBUI_DEFS})
|
|
# cmake produces this for us by default but only for shared libraries
|
|
@@ -229,10 +228,30 @@ macro(_add_exec _name)
|
|
# TODOfor some reason these don't propagate
|
|
if(NOT WIN32)
|
|
target_include_directories(${_name}
|
|
- PUBLIC .)
|
|
+ PUBLIC $<INSTALL_INTERFACE:include>)
|
|
target_compile_options(${_name}
|
|
PUBLIC ${_COMMON_CFLAGS})
|
|
endif()
|
|
endmacro()
|
|
add_subdirectory("test")
|
|
add_subdirectory("examples")
|
|
+
|
|
+if(BUILD_SHARED_LIBS)
|
|
+ install(TARGETS ${PROJECT_NAME}
|
|
+ EXPORT ${PROJECT_NAME}-config
|
|
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
|
+else()
|
|
+ install(TARGETS ${PROJECT_NAME}
|
|
+ EXPORT ${PROJECT_NAME}-config
|
|
+ DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
|
+endif()
|
|
+
|
|
+install(EXPORT ${PROJECT_NAME}-config
|
|
+ FILE unofficial-${PROJECT_NAME}-config.cmake
|
|
+ NAMESPACE unofficial::libui::
|
|
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
|
|
+)
|
|
+
|
|
+install(FILES ui.h DESTINATION include)
|