+9
-5
@@ -5,12 +5,16 @@ include(FetchContent)
|
|||||||
cmake_minimum_required(VERSION 3.25.0)
|
cmake_minimum_required(VERSION 3.25.0)
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 20)
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
|
|
||||||
|
add_compile_definitions(WIN32_LEAN_AND_MEAN NOMINMAX)
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
set(CMAKE_CXX_FLAGS "/EHsc /D_AMD64_ /DWIN32_LEAN_AND_MEAN /DVC_EXTRA_LEAN")
|
add_compile_options(/EHsc /utf-8 /Zc:char8_t)
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "/O2 /DNDEBUG")
|
if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
|
||||||
|
add_compile_definitions(_AMD64_)
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
set(CMAKE_CXX_FLAGS "-D_AMD64_ -DWIN32_LEAN_AND_MEAN -DVC_EXTRA_LEAN")
|
add_compile_options(-m64)
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
project(hex-unlocked LANGUAGES CXX)
|
project(hex-unlocked LANGUAGES CXX)
|
||||||
@@ -135,7 +139,7 @@ endif()
|
|||||||
file(GLOB_RECURSE UNLOCKER_SOURCES CONFIGURE_DEPENDS "src/unlocker/*.cpp" "src/unlocker/*.h")
|
file(GLOB_RECURSE UNLOCKER_SOURCES CONFIGURE_DEPENDS "src/unlocker/*.cpp" "src/unlocker/*.h")
|
||||||
|
|
||||||
add_executable(hex-unlocked ${UNLOCKER_SOURCES})
|
add_executable(hex-unlocked ${UNLOCKER_SOURCES})
|
||||||
target_link_libraries(hex-unlocked PRIVATE hex-warned seallib glaze::glaze tinymitm wininet ixwebsocket)
|
target_link_libraries(hex-unlocked PRIVATE hex-warned seallib glaze::glaze tinymitm wininet ixwebsocket crypt32)
|
||||||
|
|
||||||
# rnd exe name
|
# rnd exe name
|
||||||
string(RANDOM LENGTH 12 ALPHABET "abcdefghijklmnopqrstuvwxyz0123456789" RANDOM_EXE_NAME)
|
string(RANDOM LENGTH 12 ALPHABET "abcdefghijklmnopqrstuvwxyz0123456789" RANDOM_EXE_NAME)
|
||||||
|
|||||||
Reference in New Issue
Block a user