[enkits] Fixing version 1.11 not properly configured to work as a dynamic library (#40715)

This commit is contained in:
Ada Tufankjian 2024-08-31 22:58:50 -07:00 committed by GitHub
parent 06f7e2b53e
commit 93c815ff34
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 24 additions and 43 deletions

View File

@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0c12562..e15f863 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -85,6 +85,8 @@ if( ENKITS_INSTALL )
install(
TARGETS enkiTS
EXPORT enkiTSConfig
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(FILES ${ENKITS_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/enkiTS)
install(

View File

@ -1,11 +1,11 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO dougbinks/enkiTS
REF "v${VERSION}"
SHA512 72a05058caef8d6a33cd70500aeaf05cc61521721697969d4845279b5a79b63e7a6a3f3971c5eff2776e5575720b58252e9d251ef565c2123275a3e8540948db
REF "03e6a2c0c97208ade44478d617d2002b0f95faf4"
SHA512 2889a7b015319115f6acf74036f709b30786602f3b7205bdf401644172e2d92307f325719ccc02ad93a09557a9155e31db4d8e07f9f77e0c700d5a3365091ad3
HEAD_REF master
PATCHES
update_install.patch
fix_shared_install.patch
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED)
@ -22,9 +22,7 @@ vcpkg_cmake_configure(
vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()
# Must specify args due to case sensitivity on some filesystems
vcpkg_cmake_config_fixup(PACKAGE_NAME enkiTS CONFIG_PATH share/enkiTS)
file(RENAME "${CURRENT_PACKAGES_DIR}/share/enkiTS/enkiTS-config.cmake" "${CURRENT_PACKAGES_DIR}/share/enkiTS/enkiTSConfig.cmake")
vcpkg_cmake_config_fixup(PACKAGE_NAME enkiTS CONFIG_PATH lib/cmake/enkiTS)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")

View File

@ -1,35 +0,0 @@
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 +63,19 @@ 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
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ 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 )

View File

@ -1,7 +1,7 @@
{
"name": "enkits",
"version": "1.11",
"port-version": 2,
"port-version": 3,
"description": "A permissively licensed C and C++ Task Scheduler for creating parallel programs.",
"homepage": "https://github.com/dougbinks/enkiTS",
"license": "Zlib",

View File

@ -2538,7 +2538,7 @@
},
"enkits": {
"baseline": "1.11",
"port-version": 2
"port-version": 3
},
"ensmallen": {
"baseline": "2.19.1",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "7f702d4ff681f810a7100c4dea92ecc121923894",
"version": "1.11",
"port-version": 3
},
{
"git-tree": "8fc05799f3650a3e68dda59c7d6c813e5e49408e",
"version": "1.11",