Update to properly use vcpkg-provided Crypto++
This commit is contained in:
@ -46,8 +46,13 @@ else()
|
||||
endif()
|
||||
|
||||
# Handle Crypto++ dependency
|
||||
set(CRYPTOPP_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/../vcpkg/installed/x64-windows/include")
|
||||
set(CRYPTOPP_LIBRARIES "${CMAKE_CURRENT_SOURCE_DIR}/../vcpkg/installed/x64-windows/lib/cryptopp.lib")
|
||||
find_package(cryptopp CONFIG QUIET)
|
||||
|
||||
if(cryptopp_FOUND)
|
||||
message(STATUS "Found Crypto++ package via vcpkg")
|
||||
else()
|
||||
message(WARNING "Crypto++ not found via vcpkg. Make sure to use the vcpkg toolchain file.")
|
||||
endif()
|
||||
|
||||
# Add library sources
|
||||
set(SOURCES
|
||||
@ -72,11 +77,12 @@ add_library(privatebinapi SHARED ${SOURCES} ${HEADERS})
|
||||
# Include directories
|
||||
target_include_directories(privatebinapi PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
${CRYPTOPP_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
# Link Crypto++
|
||||
target_link_libraries(privatebinapi PRIVATE ${CRYPTOPP_LIBRARIES})
|
||||
if(cryptopp_FOUND)
|
||||
target_link_libraries(privatebinapi PRIVATE cryptopp::cryptopp)
|
||||
endif()
|
||||
|
||||
# Include nlohmann/json
|
||||
if(nlohmann_json_FOUND)
|
||||
|
||||
Reference in New Issue
Block a user