TheBrokenRail
592d6c4e63
Some checks failed
CI / Build (ARMHF, Client) (push) Waiting to run
CI / Build (ARMHF, Server) (push) Waiting to run
CI / Test (Client) (push) Waiting to run
CI / Test (Server) (push) Waiting to run
CI / Build Example Mods (push) Waiting to run
CI / Release (push) Blocked by required conditions
CI / Build (AMD64, Server) (push) Successful in 13m53s
CI / Build (AMD64, Client) (push) Successful in 14m25s
CI / Build (ARM64, Client) (push) Has been cancelled
CI / Build (ARM64, Server) (push) Has been cancelled
22 lines
833 B
CMake
22 lines
833 B
CMake
# Build Mode
|
|
set(MCPI_BUILD_MODE "native" CACHE STRING "\"arm\" = Build Only Code That Must Be ARM; \"native\" = Build Architecture-Independent Code")
|
|
set_property(CACHE MCPI_BUILD_MODE PROPERTY STRINGS "arm" "native")
|
|
if(MCPI_BUILD_MODE STREQUAL "arm")
|
|
set(BUILD_ARM_COMPONENTS TRUE)
|
|
set(BUILD_NATIVE_COMPONENTS FALSE)
|
|
elseif(MCPI_BUILD_MODE STREQUAL "native")
|
|
set(BUILD_ARM_COMPONENTS FALSE)
|
|
set(BUILD_NATIVE_COMPONENTS TRUE)
|
|
else()
|
|
message(FATAL_ERROR "Invalid Mode")
|
|
endif()
|
|
|
|
# Specify Options
|
|
set(MCPI_OPTIONS "")
|
|
function(mcpi_option name description type default)
|
|
set(full_name "MCPI_${name}")
|
|
set("${full_name}" "${default}" CACHE "${type}" "${description}")
|
|
list(APPEND MCPI_OPTIONS "-D${full_name}:${type}=${${full_name}}")
|
|
set(MCPI_OPTIONS "${MCPI_OPTIONS}" PARENT_SCOPE)
|
|
endfunction()
|