CMake Cleanup
This commit is contained in:
parent
126c3d618d
commit
23df63abb7
@ -43,20 +43,15 @@ set(MCPI_APP_TITLE "${DEFAULT_APP_TITLE}" CACHE STRING "App Title")
|
|||||||
|
|
||||||
# Configure Build Mode
|
# Configure Build Mode
|
||||||
if(MCPI_BUILD_MODE STREQUAL "arm")
|
if(MCPI_BUILD_MODE STREQUAL "arm")
|
||||||
set(USE_ARM32_TOOLCHAIN TRUE)
|
|
||||||
set(BUILD_ARM_COMPONENTS TRUE)
|
set(BUILD_ARM_COMPONENTS TRUE)
|
||||||
set(BUILD_NATIVE_COMPONENTS FALSE)
|
set(BUILD_NATIVE_COMPONENTS FALSE)
|
||||||
elseif(MCPI_BUILD_MODE STREQUAL "native")
|
elseif(MCPI_BUILD_MODE STREQUAL "native")
|
||||||
set(USE_ARM32_TOOLCHAIN FALSE)
|
|
||||||
set(BUILD_ARM_COMPONENTS FALSE)
|
set(BUILD_ARM_COMPONENTS FALSE)
|
||||||
set(BUILD_NATIVE_COMPONENTS TRUE)
|
set(BUILD_NATIVE_COMPONENTS TRUE)
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Invalid Mode")
|
message(FATAL_ERROR "Invalid Mode")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Utility Functions
|
|
||||||
include(cmake/util.cmake)
|
|
||||||
|
|
||||||
# Specify Variant Name
|
# Specify Variant Name
|
||||||
set(MCPI_VARIANT_NAME "minecraft-pi-reborn")
|
set(MCPI_VARIANT_NAME "minecraft-pi-reborn")
|
||||||
if(MCPI_SERVER_MODE)
|
if(MCPI_SERVER_MODE)
|
||||||
@ -99,13 +94,16 @@ endif()
|
|||||||
# Start Project
|
# Start Project
|
||||||
project(minecraft-pi-reborn)
|
project(minecraft-pi-reborn)
|
||||||
|
|
||||||
|
# Utility Functions
|
||||||
|
include(cmake/util.cmake)
|
||||||
|
|
||||||
# Sanity Check
|
# Sanity Check
|
||||||
if(BUILD_NATIVE_COMPONENTS AND NOT CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" AND NOT MCPI_IS_MIXED_BUILD)
|
if(BUILD_NATIVE_COMPONENTS AND NOT CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" AND NOT MCPI_IS_MIXED_BUILD)
|
||||||
message(FATAL_ERROR "Project is configured as a mixed-buld, but MCPI_IS_MIXED_BUILD is disabled.")
|
message(FATAL_ERROR "Project is configured as a mixed-buld, but MCPI_IS_MIXED_BUILD is disabled.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Require ARM Compilation
|
# Require ARM Compilation
|
||||||
if(USE_ARM32_TOOLCHAIN AND NOT CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
|
if(BUILD_ARM_COMPONENTS AND NOT CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
|
||||||
message(FATAL_ERROR "ARM-Targeting Compiler Required")
|
message(FATAL_ERROR "ARM-Targeting Compiler Required")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user