metaforce/hecl/CMakeLists.txt

53 lines
1.6 KiB
CMake
Raw Normal View History

2015-09-02 18:52:04 +00:00
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
2017-11-14 04:51:09 +00:00
cmake_minimum_required(VERSION 3.10 FATAL_ERROR) # because of c++17
2015-07-07 03:24:09 +00:00
project(hecl)
2017-06-18 02:50:55 +00:00
2017-11-13 06:13:53 +00:00
set(CMAKE_CXX_STANDARD 17)
2017-06-18 02:50:55 +00:00
set(CMAKE_CXX_STANDARD_REQUIRED ON)
2015-07-26 02:52:02 +00:00
if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
2015-08-02 04:25:54 +00:00
# Shaddup MSVC
add_definitions(-DUNICODE=1 -D_UNICODE=1 -D_CRT_SECURE_NO_WARNINGS=1 /wd4267 /wd4244)
2015-07-22 19:14:50 +00:00
else()
2017-06-18 02:50:55 +00:00
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-multichar -fno-exceptions")
2015-07-22 19:14:50 +00:00
endif()
endif()
configure_file(DataSpecRegistry.hpp.in ${CMAKE_CURRENT_SOURCE_DIR}/DataSpecRegistry.hpp @ONLY)
2016-03-04 23:02:44 +00:00
set(ATHENA_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/extern/athena/include)
set(ATHENA_INCLUDE_DIR ${ATHENA_INCLUDE_DIR} PARENT_SCOPE)
2015-07-19 20:52:22 +00:00
set(SQUISH_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/extern/libSquish)
set(SQUISH_INCLUDE_DIR ${SQUISH_INCLUDE_DIR} PARENT_SCOPE)
2015-11-14 07:37:20 +00:00
2016-03-04 23:02:44 +00:00
set(BOO_INCLUDE_DIR extern/boo/include)
2015-11-14 07:37:20 +00:00
add_subdirectory(bintoc)
2017-12-07 04:09:27 +00:00
if(NOT TARGET bintoc)
# Use native if cross compiling
find_package(hecl-bintoc REQUIRED)
endif()
2015-07-07 03:24:09 +00:00
add_subdirectory(extern)
2017-12-07 04:09:27 +00:00
if(NOT TARGET atdna)
# Import native atdna if cross-compiling
find_package(atdna REQUIRED)
if(NOT TARGET atdna)
message(FATAL_ERROR "atdna required for building hecl; please verify LLVM installation")
endif()
endif()
2016-02-23 02:33:29 +00:00
add_definitions(${BOO_SYS_DEFINES})
2016-07-17 21:20:01 +00:00
include_directories(include blender ${LOGVISOR_INCLUDE_DIR} ${ATHENA_INCLUDE_DIR}
${BOO_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} ${BOO_SYS_INCLUDES})
2015-07-07 03:24:09 +00:00
add_subdirectory(lib)
2015-07-08 04:26:29 +00:00
add_subdirectory(blender)
2015-07-07 03:24:09 +00:00
add_subdirectory(driver)
2016-03-04 23:02:44 +00:00
install(DIRECTORY include/hecl DESTINATION include/hecl)
2015-11-12 04:32:53 +00:00
# Runtime test
add_subdirectory(test)