forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[libjuice] Update to 1.5.2, cleanup (microsoft#40335)
- Loading branch information
Showing
7 changed files
with
86 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 5712462..dd6c669 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -120,11 +120,14 @@ if(WIN32) | ||
endif() | ||
|
||
if (USE_NETTLE) | ||
- find_package(Nettle REQUIRED) | ||
+ find_path(NETTLE_INCLUDE_PATH "nettle/hmac.h" REQUIRED) | ||
+ find_library(NETTLE_LIBRARY_PATH NAMES nettle libnettle NAMES_PER_DIR REQUIRED) | ||
+ target_include_directories(juice PRIVATE ${NETTLE_INCLUDE_PATH}) | ||
+ target_include_directories(juice-static PRIVATE ${NETTLE_INCLUDE_PATH}) | ||
target_compile_definitions(juice PRIVATE USE_NETTLE=1) | ||
- target_link_libraries(juice PRIVATE Nettle::Nettle) | ||
+ target_link_libraries(juice PRIVATE ${NETTLE_LIBRARY_PATH}) | ||
target_compile_definitions(juice-static PRIVATE USE_NETTLE=1) | ||
- target_link_libraries(juice-static PRIVATE Nettle::Nettle) | ||
+ target_link_libraries(juice-static PRIVATE ${NETTLE_LIBRARY_PATH}) | ||
else() | ||
target_compile_definitions(juice PRIVATE USE_NETTLE=0) | ||
target_compile_definitions(juice-static PRIVATE USE_NETTLE=0) | ||
@@ -137,8 +140,6 @@ endif() | ||
|
||
if(APPLE) | ||
# This seems to be necessary on MacOS | ||
- target_include_directories(juice PRIVATE /usr/local/include) | ||
- target_include_directories(juice-static PRIVATE /usr/local/include) | ||
endif() | ||
|
||
set_target_properties(juice PROPERTIES EXPORT_NAME LibJuice) | ||
diff --git a/cmake/LibJuiceConfig.cmake.in b/cmake/LibJuiceConfig.cmake.in | ||
index 247e53f..f049d9a 100644 | ||
--- a/cmake/LibJuiceConfig.cmake.in | ||
+++ b/cmake/LibJuiceConfig.cmake.in | ||
@@ -1,4 +1,8 @@ | ||
@PACKAGE_INIT@ | ||
|
||
+include(CMakeFindDependencyMacro) | ||
+set(THREADS_PREFER_PTHREAD_FLAG ON) | ||
+find_dependency(Threads) | ||
+ | ||
include("${CMAKE_CURRENT_LIST_DIR}/LibJuiceTargets.cmake") | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index dd6c669..18e4166 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -148,11 +148,20 @@ add_library(LibJuice::LibJuice ALIAS juice) | ||
set_target_properties(juice-static PROPERTIES EXPORT_NAME LibJuiceStatic) | ||
add_library(LibJuice::LibJuiceStatic ALIAS juice-static) | ||
|
||
+if(BUILD_SHARED_LIBS) | ||
install(TARGETS juice EXPORT LibJuiceTargets | ||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} | ||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
) | ||
+else() | ||
+ set_target_properties(juice PROPERTIES EXCLUDE_FROM_ALL 1) | ||
+ set_target_properties(juice PROPERTIES OUTPUT_NAME juice-shared) | ||
+ set_target_properties(juice-static PROPERTIES EXCLUDE_FROM_ALL 0) | ||
+ set_target_properties(juice-static PROPERTIES OUTPUT_NAME juice) | ||
+ set_target_properties(juice-static PROPERTIES EXPORT_NAME LibJuice) | ||
+ install(TARGETS juice-static EXPORT LibJuiceTargets) | ||
+endif() | ||
|
||
install(FILES ${LIBJUICE_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/juice) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters