WindowsXPKg/CMakeLists.txt
WitherOrNot 98c8db7e02
merge server and confid with xpkey, add LH keys (#18)
* merge server and confid with xpkey, add LH keys

* improve error handling

* update README.md

* fix line endings

* reorder products section of keys.json

* use options as global variable

* rename genServer to isBink2002

* small refactor

* handle unknown error codepath on confirmation id
remove redundant else for BINK1998 generation

* finish conversion from std::cout -> fmt::print();

---------

Co-authored-by: Neo <321592+Neo-Desktop@users.noreply.github.com>
2023-06-06 15:04:39 -07:00

30 lines
853 B
CMake

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)
FIND_PACKAGE(OpenSSL REQUIRED)
IF(!OPENSSL_FOUND)
MESSAGE(FATAL_ERROR "OpenSSL Development Libraries Not Found")
ENDIF()
INCLUDE(cmake/CPM.cmake)
# Include JSON runtime library
CPMAddPackage(
NAME nlohmann_json
GITHUB_REPOSITORY nlohmann/json
VERSION 3.11.2
)
CPMAddPackage("gh:fmtlib/fmt#7.1.3")
CONFIGURE_FILE(keys.json keys.json COPYONLY)
#SET(BUILD_SHARED_LIBS OFF)
#SET(CMAKE_EXE_LINKER_FLAGS "-static")
ADD_EXECUTABLE(xpkey src/main.cpp src/server.cpp src/xp.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)