update CMakeLists to correctly compile sources - update readme to reflect that

factor out reused functions to shared.cpp/shared.h
This commit is contained in:
Neo
2023-05-30 12:37:13 -07:00
parent ac47a88f7e
commit 05ee5eb933
9 changed files with 159 additions and 188 deletions

View File

@@ -1,9 +1,18 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11)
PROJECT(WindowsXPKg)
SET(CMAKE_CXX_STANDARD 17)
SET(SOURCE main.c xp_algorithm.c server_algorithm.c)
SET(HEADER header.h)
TARGET_LINK_LIBRARIES(${CMAKE_SOURCE_DIR}/lib/libcrypto.lib)
ADD_EXECUTABLE(Release ${SOURCE})
find_package(PkgConfig REQUIRED)
pkg_search_module(OPENSSL REQUIRED openssl)
if (!OPENSSL_FOUND)
message(FATAL_ERROR "OpenSSL Not Found")
endif()
ADD_EXECUTABLE(xpkey xp_algorithm.cpp shared.cpp)
TARGET_INCLUDE_DIRECTORIES(xpkey PUBLIC crypto)
TARGET_LINK_LIBRARIES(xpkey PUBLIC crypto)
ADD_EXECUTABLE(srv2003key server_algorithm.cpp shared.cpp)
TARGET_INCLUDE_DIRECTORIES(srv2003key PUBLIC crypto)
TARGET_LINK_LIBRARIES(srv2003key PUBLIC crypto)