PrimeWorldEditor/CMakeLists.txt

51 lines
1.6 KiB
CMake
Raw Permalink Normal View History

2019-05-23 16:04:29 -07:00
cmake_minimum_required(VERSION 3.12)
2019-05-25 23:24:13 -07:00
set(MACOSX_DEPLOYMENT_TARGET 10.10)
2019-05-23 16:04:29 -07:00
2019-05-28 19:51:30 -07:00
# Use release build type as default (assimp complains if this is unset)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
2019-11-24 18:46:57 -08:00
set(CMAKE_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE})
2019-05-28 19:51:30 -07:00
2019-05-23 16:04:29 -07:00
project(PrimeWorldEditor CXX)
2019-11-24 18:46:57 -08:00
option(PWE_PUBLIC_RELEASE "Enable end-user deployment configuration for PWE" ON)
2019-06-12 14:21:41 -07:00
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)
2019-11-06 18:52:45 -08:00
message(FATAL_ERROR "Please run 'git submodule update --init --recursive' to fetch submodules.")
endif()
2019-05-23 16:04:29 -07:00
include(./dew.cmake)
integrate_dew()
2019-05-25 23:24:13 -07:00
include(cmake/generate_product_version.cmake)
if(MSVC)
add_compile_options(/WX /wd4267 /wd4100 /wd4101 /wd4189)
2019-05-28 19:51:30 -07:00
else()
add_compile_options(-Wno-multichar -Wno-undefined-var-template)
2019-05-28 19:51:30 -07:00
endif()
if(APPLE)
2019-05-27 14:25:00 -07:00
add_compile_definitions(GL_SILENCE_DEPRECATION)
endif()
2019-05-23 16:04:29 -07:00
# Set where the binary files will be built. The program will not execute from
# here. You must run "make install" to install these to the proper location
# as defined above.
2019-05-25 23:24:13 -07:00
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
2019-05-23 16:04:29 -07:00
# Directly integrate libcommon and block install targets
2019-06-11 20:22:25 -07:00
set(LIBCOMMON_GENERATE_INSTALL_TARGETS OFF CACHE BOOL "Make libcommon install targets" FORCE)
set(CODEGEN_GENERATE_INSTALL_TARGETS OFF CACHE BOOL "Make codegen install targets" FORCE)
set(CODEGEN_BUILD_PACKAGE_DURING_CONFIGURE ON)
add_subdirectory(externals/LibCommon)
2019-05-23 16:04:29 -07:00
add_subdirectory(src/Core)
add_subdirectory(src/Editor)