WindowsXPKg/CMakeLists.txt

30 lines
861 B
CMake
Raw Normal View History

2023-06-01 23:09:44 +03:00
CMAKE_MINIMUM_REQUIRED(VERSION 3.9)
PROJECT(WindowsXPKg)
SET(CMAKE_CXX_STANDARD 17)
# TODO: commenting out static builds for now
#SET(OPENSSL_USE_STATIC_LIBS TRUE)
2023-06-02 15:36:34 +03:00
FIND_PACKAGE(OpenSSL REQUIRED)
2023-06-01 23:09:44 +03:00
IF(!OPENSSL_FOUND)
MESSAGE(FATAL_ERROR "OpenSSL Development Libraries Not Found")
ENDIF()
2023-06-01 23:09:44 +03:00
INCLUDE(cmake/CPM.cmake)
2023-06-01 23:09:44 +03:00
# Include JSON runtime library
CPMAddPackage(
NAME nlohmann_json
GITHUB_REPOSITORY nlohmann/json
2023-06-02 15:36:34 +03:00
VERSION 3.11.2
)
CPMAddPackage("gh:fmtlib/fmt#7.1.3")
2023-06-01 23:09:44 +03:00
CONFIGURE_FILE(keys.json keys.json COPYONLY)
2023-06-01 18:54:11 +03:00
#SET(BUILD_SHARED_LIBS OFF)
#SET(CMAKE_EXE_LINKER_FLAGS "-static")
2023-06-07 22:23:59 +03:00
ADD_EXECUTABLE(xpkey src/main.cpp src/BINK2002.cpp src/BINK1998.cpp src/key.cpp src/util.cpp src/cli.cpp src/confid.cpp)
TARGET_INCLUDE_DIRECTORIES(xpkey PUBLIC crypto)
TARGET_LINK_LIBRARIES(xpkey PUBLIC OpenSSL::Crypto nlohmann_json::nlohmann_json fmt)