Add CMake variable for PUBLIC_RELEASE
This commit is contained in:
parent
e6a1837450
commit
741185e8d6
|
@ -8,6 +8,12 @@ endif()
|
|||
|
||||
project(PrimeWorldEditor CXX)
|
||||
|
||||
option(PWE_PUBLIC_RELEASE "Enable end-user deployment configuration for PWE" OFF)
|
||||
if (PWE_PUBLIC_RELEASE)
|
||||
add_compile_definitions(PUBLIC_RELEASE=1)
|
||||
message(STATUS "Enabled public release mode")
|
||||
endif()
|
||||
|
||||
# Ensure submodules checked out
|
||||
if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/externals/LibCommon/CMakeLists.txt)
|
||||
message(FATAL_ERROR "Please run 'git submodules update --init --recursive' to fetch submodules.")
|
||||
|
|
|
@ -119,7 +119,6 @@ target_compile_definitions(
|
|||
PRIVATE
|
||||
"APP_NAME=\"${PWE_APP_NAME}\""
|
||||
"APP_VERSION=\"${PROJECT_VERSION}\""
|
||||
"PUBLIC_RELEASE=1"
|
||||
"APP_FULL_NAME=\"${PWE_APP_NAME} ${PWE_WC_DESCRIBE}\""
|
||||
UNICODE
|
||||
)
|
||||
|
@ -148,6 +147,9 @@ if (WIN32 OR APPLE)
|
|||
set(CPACK_SYSTEM_NAME macOS)
|
||||
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF)
|
||||
endif()
|
||||
if (CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
set(CPACK_PACKAGE_NAME ${CMAKE_PROJECT_NAME}-debug)
|
||||
endif()
|
||||
include(CPack)
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Reference in New Issue