SCRATCH move some cmake bits
This commit is contained in:
parent
db877ba121
commit
d1ba972c59
@ -66,24 +66,6 @@ query_qmake(QT_INSTALL_LIBEXECS QT_LIBEXECS_DIR)
|
|||||||
query_qmake(QT_HOST_DATA QT_DATA_DIR)
|
query_qmake(QT_HOST_DATA QT_DATA_DIR)
|
||||||
set(QT_MKSPECS_DIR ${QT_DATA_DIR}/mkspecs)
|
set(QT_MKSPECS_DIR ${QT_DATA_DIR}/mkspecs)
|
||||||
|
|
||||||
|
|
||||||
################################ SET UP BUILD OPTIONS ################################
|
|
||||||
|
|
||||||
######## Check endianness ########
|
|
||||||
include(TestBigEndian)
|
|
||||||
test_big_endian(BIGENDIAN)
|
|
||||||
if(${BIGENDIAN})
|
|
||||||
add_definitions(-DMULTIMC_BIG_ENDIAN)
|
|
||||||
endif(${BIGENDIAN})
|
|
||||||
|
|
||||||
#### Custom target to just print the version.
|
|
||||||
add_custom_target(version echo "Version: ${MultiMC_VERSION_STRING}")
|
|
||||||
|
|
||||||
#### Check the current Git commit
|
|
||||||
include(GitFunctions)
|
|
||||||
git_run(COMMAND rev-parse HEAD DEFAULT "Unknown" OUTPUT_VAR MultiMC_GIT_COMMIT)
|
|
||||||
message(STATUS "Git commit: ${MultiMC_GIT_COMMIT}")
|
|
||||||
|
|
||||||
################################ Included Libs ################################
|
################################ Included Libs ################################
|
||||||
|
|
||||||
include(ExternalProject)
|
include(ExternalProject)
|
||||||
|
@ -29,6 +29,11 @@ set(MultiMC_UPDATER false CACHE BOOL "Whether or not the update system is enable
|
|||||||
# Notification URL
|
# Notification URL
|
||||||
set(MultiMC_NOTIFICATION_URL "" CACHE STRING "URL for checking for notifications.")
|
set(MultiMC_NOTIFICATION_URL "" CACHE STRING "URL for checking for notifications.")
|
||||||
|
|
||||||
|
#### Check the current Git commit
|
||||||
|
include(GitFunctions)
|
||||||
|
git_run(COMMAND rev-parse HEAD DEFAULT "Unknown" OUTPUT_VAR MultiMC_GIT_COMMIT)
|
||||||
|
message(STATUS "Git commit: ${MultiMC_GIT_COMMIT}")
|
||||||
|
|
||||||
set(MultiMC_RELEASE_VERSION_NAME "${MultiMC_VERSION_MAJOR}.${MultiMC_VERSION_MINOR}")
|
set(MultiMC_RELEASE_VERSION_NAME "${MultiMC_VERSION_MAJOR}.${MultiMC_VERSION_MINOR}")
|
||||||
if(MultiMC_VERSION_HOTFIX GREATER 0)
|
if(MultiMC_VERSION_HOTFIX GREATER 0)
|
||||||
set(MultiMC_RELEASE_VERSION_NAME "${MultiMC_RELEASE_VERSION_NAME}.${MultiMC_VERSION_HOTFIX}")
|
set(MultiMC_RELEASE_VERSION_NAME "${MultiMC_RELEASE_VERSION_NAME}.${MultiMC_VERSION_HOTFIX}")
|
||||||
@ -50,6 +55,9 @@ endif()
|
|||||||
|
|
||||||
message(STATUS "MultiMC 5 Version: ${MultiMC_VERSION_STRING}")
|
message(STATUS "MultiMC 5 Version: ${MultiMC_VERSION_STRING}")
|
||||||
|
|
||||||
|
#### Custom target to just print the version.
|
||||||
|
add_custom_target(version echo "Version: ${MultiMC_VERSION_STRING}")
|
||||||
|
|
||||||
# If the update system is enabled, make sure MultiMC_CHANLIST_URL and MultiMC_VERSION_CHANNEL are set.
|
# If the update system is enabled, make sure MultiMC_CHANLIST_URL and MultiMC_VERSION_CHANNEL are set.
|
||||||
if(MultiMC_UPDATER)
|
if(MultiMC_UPDATER)
|
||||||
if(MultiMC_VERSION_CHANNEL STREQUAL "")
|
if(MultiMC_VERSION_CHANNEL STREQUAL "")
|
||||||
|
@ -2,6 +2,13 @@ project(classparser)
|
|||||||
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
|
||||||
|
######## Check endianness ########
|
||||||
|
include(TestBigEndian)
|
||||||
|
test_big_endian(BIGENDIAN)
|
||||||
|
if(${BIGENDIAN})
|
||||||
|
add_definitions(-DMULTIMC_BIG_ENDIAN)
|
||||||
|
endif(${BIGENDIAN})
|
||||||
|
|
||||||
# Find Qt
|
# Find Qt
|
||||||
find_package(Qt5Core REQUIRED)
|
find_package(Qt5Core REQUIRED)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user