mirror of
https://github.com/Neo-Desktop/WindowsXPKg
synced 2025-12-08 19:25:13 +02:00
FindOpenSSL (Crossplatform solution)
This commit is contained in:
@@ -4,7 +4,7 @@ SET(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
SET(OPENSSL_USE_STATIC_LIBS TRUE)
|
||||
FIND_PACKAGE(PkgConfig REQUIRED)
|
||||
PKG_SEARCH_MODULE(OPENSSL REQUIRED openssl)
|
||||
FIND_PACKAGE(OpenSSL REQUIRED)
|
||||
|
||||
IF(!OPENSSL_FOUND)
|
||||
MESSAGE(FATAL_ERROR "OpenSSL Development Libraries Not Found")
|
||||
@@ -16,7 +16,8 @@ INCLUDE(cmake/CPM.cmake)
|
||||
CPMAddPackage(
|
||||
NAME nlohmann_json
|
||||
GITHUB_REPOSITORY nlohmann/json
|
||||
VERSION 3.11.2)
|
||||
VERSION 3.11.2
|
||||
)
|
||||
|
||||
CONFIGURE_FILE(keys.json keys.json COPYONLY)
|
||||
|
||||
@@ -24,8 +25,8 @@ SET(BUILD_SHARED_LIBS OFF)
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "-static")
|
||||
ADD_EXECUTABLE(xpkey src/main.cpp src/xp.cpp src/key.cpp src/util.cpp src/cli.cpp)
|
||||
TARGET_INCLUDE_DIRECTORIES(xpkey PUBLIC crypto)
|
||||
TARGET_LINK_LIBRARIES(xpkey PUBLIC crypto nlohmann_json::nlohmann_json)
|
||||
TARGET_LINK_LIBRARIES(xpkey PUBLIC OpenSSL::Crypto nlohmann_json::nlohmann_json)
|
||||
|
||||
ADD_EXECUTABLE(srv2003key src/server.cpp src/key.cpp src/util.cpp src/cli.cpp)
|
||||
TARGET_INCLUDE_DIRECTORIES(srv2003key PUBLIC crypto)
|
||||
TARGET_LINK_LIBRARIES(srv2003key PUBLIC crypto nlohmann_json::nlohmann_json)
|
||||
TARGET_LINK_LIBRARIES(srv2003key PUBLIC OpenSSL::Crypto nlohmann_json::nlohmann_json)
|
||||
Reference in New Issue
Block a user