mirror of
https://github.com/0O0o0oOoO00/Alas.git
synced 2026-05-14 12:29:25 +08:00
39 lines
927 B
CMake
39 lines
927 B
CMake
cmake_minimum_required(VERSION 3.28)
|
|
|
|
if (ANDROID)
|
|
include(platform/android.toolchain.cmake)
|
|
endif ()
|
|
if (CMAKE_HOST_WIN32 AND LINUX)
|
|
include(platform/linux.toolchain.cmake)
|
|
endif ()
|
|
|
|
project(blcrack)
|
|
enable_language(ASM)
|
|
|
|
set(CMAKE_CXX_STANDARD 23)
|
|
|
|
if (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
|
|
set(DEBUG_MODE ON)
|
|
else ()
|
|
set(DEBUG_MODE OFF)
|
|
endif ()
|
|
|
|
set(VCPKG_ROOT ${CMAKE_CURRENT_LIST_DIR}/vcpkgs)
|
|
|
|
function(set_output_dir out_dir)
|
|
string(TOUPPER ${CMAKE_BUILD_TYPE} build_type)
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${build_type} ${out_dir} PARENT_SCOPE)
|
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${build_type} ${out_dir} PARENT_SCOPE)
|
|
endfunction()
|
|
|
|
if (WIN32)
|
|
include(platform/win32.cmake)
|
|
elseif (LINUX)
|
|
include(platform/linux.cmake)
|
|
elseif (ANDROID)
|
|
include(platform/android.cmake)
|
|
else ()
|
|
message(FATAL_ERROR "Unsupported platform")
|
|
endif ()
|
|
|