mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-31 05:03:22 +08:00
96 lines
3.2 KiB
Diff
96 lines
3.2 KiB
Diff
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||
|
index aaca07d..a893ee1 100644
|
||
|
--- a/CMakeLists.txt
|
||
|
+++ b/CMakeLists.txt
|
||
|
@@ -116,13 +116,6 @@ add_library(${PROJECT_NAME} SHARED ${SRCS_COMMON} ${HDRS_COMMON}
|
||
|
SOURCE_GROUP("Source Files\\Autogenerated" FILES ${ACT_GENERATED_SOURCE})
|
||
|
|
||
|
|
||
|
-file(GLOB
|
||
|
- LIBS_INCLUDE
|
||
|
- LIST_DIRECTORIES true
|
||
|
- ${CMAKE_CURRENT_SOURCE_DIR}/Libraries/*/Include
|
||
|
-)
|
||
|
-list(FILTER LIBS_INCLUDE EXCLUDE REGEX "zlib|libzip|libressl")
|
||
|
-target_include_directories(${PROJECT_NAME} PRIVATE ${LIBS_INCLUDE})
|
||
|
|
||
|
# allow FASTFLOAT_ALLOWS_LEADING_PLUS
|
||
|
add_definitions(-DFASTFLOAT_ALLOWS_LEADING_PLUS=1)
|
||
|
@@ -170,20 +163,33 @@ if (USE_INCLUDED_LIBZIP)
|
||
|
endif()
|
||
|
|
||
|
else()
|
||
|
- find_package(PkgConfig REQUIRED)
|
||
|
- pkg_check_modules(LIBZIP REQUIRED libzip)
|
||
|
- target_link_libraries(${PROJECT_NAME} ${LIBZIP_LIBRARIES})
|
||
|
+ find_package(LIBZIP REQUIRED)
|
||
|
+ target_link_libraries(${PROJECT_NAME} PRIVATE libzip::zip)
|
||
|
endif()
|
||
|
|
||
|
|
||
|
if (USE_INCLUDED_ZLIB)
|
||
|
target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/Libraries/zlib/Include)
|
||
|
else()
|
||
|
- find_package(PkgConfig REQUIRED)
|
||
|
- pkg_check_modules(ZLIB REQUIRED zlib)
|
||
|
- target_link_libraries(${PROJECT_NAME} ${ZLIB_LIBRARIES})
|
||
|
+ find_package(ZLIB REQUIRED)
|
||
|
+ target_link_libraries(${PROJECT_NAME} PRIVATE ZLIB::ZLIB)
|
||
|
endif()
|
||
|
|
||
|
+#devendor base64
|
||
|
+# Include the directory for header files
|
||
|
+find_path(CPP_BASE64_INCLUDE_DIRS "cpp-base64/base64.cpp")
|
||
|
+include_directories("${CPP_BASE64_INCLUDE_DIRS}/cpp-base64")
|
||
|
+set(BASE64_SRC
|
||
|
+ ${CPP_BASE64_INCLUDE_DIRS}/cpp-base64/base64.h
|
||
|
+ ${CPP_BASE64_INCLUDE_DIRS}/cpp-base64/base64.cpp)
|
||
|
+message("BASE64_SRC" ${BASE64_SRC})
|
||
|
+# Append BASE64_SRC to the target
|
||
|
+target_sources(${PROJECT_NAME} PRIVATE ${BASE64_SRC})
|
||
|
+
|
||
|
+#devendor FastFloat
|
||
|
+find_package(FastFloat CONFIG REQUIRED)
|
||
|
+target_link_libraries(${PROJECT_NAME} PRIVATE FastFloat::fast_float)
|
||
|
+
|
||
|
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "" IMPORT_PREFIX "" )
|
||
|
# This makes sure symbols are exported
|
||
|
target_compile_options(${PROJECT_NAME} PRIVATE "-D__LIB3MF_EXPORTS")
|
||
|
diff --git a/Include/Common/NMR_StringUtils.h b/Include/Common/NMR_StringUtils.h
|
||
|
index 4cafe3a..b32bc76 100644
|
||
|
--- a/Include/Common/NMR_StringUtils.h
|
||
|
+++ b/Include/Common/NMR_StringUtils.h
|
||
|
@@ -37,7 +37,7 @@ and Exception-safe
|
||
|
#include "Common/NMR_Types.h"
|
||
|
#include "Common/NMR_Local.h"
|
||
|
|
||
|
-#include <fast_float.h>
|
||
|
+#include <fast_float/fast_float.h>
|
||
|
|
||
|
#include <string>
|
||
|
#include <string.h>
|
||
|
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
|
||
|
index 2d94b2c..4f2a96b 100644
|
||
|
--- a/Source/CMakeLists.txt
|
||
|
+++ b/Source/CMakeLists.txt
|
||
|
@@ -12,7 +12,6 @@ if (USE_INCLUDED_ZLIB)
|
||
|
file(GLOB ZLIB_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "Libraries/zlib/Source/*.c")
|
||
|
endif()
|
||
|
|
||
|
-file (GLOB CPPBASE64_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "Libraries/cpp-base64/Source/*.cpp")
|
||
|
|
||
|
# sources
|
||
|
set(SRCS_PLATFORM
|
||
|
diff --git a/cmake/lib3mfConfig.cmake b/cmake/lib3mfConfig.cmake
|
||
|
index f1305b8..b7755c3 100644
|
||
|
--- a/cmake/lib3mfConfig.cmake
|
||
|
+++ b/cmake/lib3mfConfig.cmake
|
||
|
@@ -1,4 +1,7 @@
|
||
|
# lib3mfConfig.cmake
|
||
|
+include(CMakeFindDependencyMacro)
|
||
|
+find_dependency(libzip)
|
||
|
+find_dependency(ZLIB)
|
||
|
|
||
|
if(VCPKG_TOOLCHAIN)
|
||
|
message("Lib3MF - VCPKG Tool Chain")
|