metaforce/hecl/lib/CMakeLists.txt

88 lines
2.6 KiB
CMake
Raw Normal View History

macro(hecl_add_list rel_path a_list)
unset(tmp_list)
foreach(path IN LISTS ${a_list})
list(APPEND tmp_list "${rel_path}/${path}")
endforeach(path)
set(${a_list} "${tmp_list}" PARENT_SCOPE)
endmacro(hecl_add_list)
add_subdirectory(Blender)
2015-07-22 12:14:50 -07:00
if(WIN32)
2019-06-12 18:29:52 -07:00
list(APPEND PLAT_SRCS ../include/hecl/winsupport.hpp)
2015-07-22 12:14:50 -07:00
endif()
if("${CMAKE_BUILD_TYPE}" STREQUAL "Release" OR "${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo")
add_definitions(-DHECL_MULTIPROCESSOR)
endif()
2018-01-09 22:16:18 -08:00
set(HECL_HEADERS
../include/hecl/hecl.hpp
2018-03-23 14:40:12 -07:00
../include/hecl/MultiProgressPrinter.hpp
2018-01-09 22:16:18 -08:00
../include/hecl/FourCC.hpp
2019-05-07 20:47:34 -07:00
../include/hecl/TypedVariant.hpp
2018-01-09 22:16:18 -08:00
../include/hecl/HMDLMeta.hpp
2019-05-07 20:47:34 -07:00
../include/hecl/Backend.hpp
2018-01-09 22:16:18 -08:00
../include/hecl/Blender/Connection.hpp
2018-10-22 01:14:32 -07:00
../include/hecl/Blender/SDNARead.hpp
2018-01-09 22:16:18 -08:00
../include/hecl/Blender/Token.hpp
../include/hecl/SteamFinder.hpp
../include/hecl/Database.hpp
../include/hecl/Runtime.hpp
../include/hecl/ClientProcess.hpp
../include/hecl/BitVector.hpp
../include/hecl/MathExtras.hpp
2022-01-31 16:06:54 -08:00
# ../include/hecl/UniformBufferPool.hpp
# ../include/hecl/VertexBufferPool.hpp
)
2018-01-09 22:16:18 -08:00
set(COMMON_SOURCES
hecl.cpp
2018-03-23 14:40:12 -07:00
MultiProgressPrinter.cpp
2018-01-09 22:16:18 -08:00
Project.cpp
ProjectPath.cpp
HumanizeNumber.cpp
2022-01-31 16:06:54 -08:00
# Console.cpp
2018-01-09 22:16:18 -08:00
ClientProcess.cpp
SteamFinder.cpp
2022-01-31 16:06:54 -08:00
WideStringConvert.cpp)
2018-01-09 22:16:18 -08:00
2019-02-26 21:13:19 -08:00
if(UNIX)
list(APPEND PLAT_SRCS closefrom.c)
endif()
2018-01-09 22:16:18 -08:00
add_library(hecl-full
${FRONTEND_SOURCES}
${BLENDER_SOURCES}
${COMMON_SOURCES}
${HECL_HEADERS}
${PLAT_SRCS}
2022-01-31 16:06:54 -08:00
${FIND_BLENDER_SOURCES})
target_include_directories(hecl-full PUBLIC ../include)
target_link_libraries(hecl-full PUBLIC ${HECL_APPLICATION_REPS_TARGETS_LIST}
2022-02-17 16:38:31 -08:00
hecl-blender-addon boo athena-core logvisor xxhash)
target_atdna(hecl-full atdna_HMDLMeta_full.cpp ../include/hecl/HMDLMeta.hpp)
target_atdna(hecl-full atdna_SDNARead_full.cpp ../include/hecl/Blender/SDNARead.hpp)
2018-01-09 22:16:18 -08:00
add_library(hecl-light
${RUNTIME_SOURCES}
${COMMON_SOURCES}
${HECL_HEADERS}
${PLAT_SRCS}
${FIND_BLENDER_SOURCES})
target_include_directories(hecl-light PUBLIC ../include)
2022-02-17 16:38:31 -08:00
target_link_libraries(hecl-light PUBLIC ${HECL_APPLICATION_REPS_TARGETS_LIST} boo athena-core logvisor aurora xxhash)
if (WIN32)
# For FindBlender
target_link_libraries(hecl-light PUBLIC Version)
endif ()
target_atdna(hecl-light atdna_HMDLMeta_light.cpp ../include/hecl/HMDLMeta.hpp)
2018-10-06 19:53:57 -07:00
2017-12-11 18:05:28 -08:00
if(COMMAND add_sanitizers)
2018-01-09 22:16:18 -08:00
add_sanitizers(hecl-full)
add_sanitizers(hecl-light)
2018-10-06 19:53:57 -07:00
add_sanitizers(hecl-compilers)
2017-12-28 23:56:31 -08:00
endif()
2017-12-06 20:09:27 -08:00
if(WINDOWS_STORE)
2018-01-09 22:16:18 -08:00
set_property(TARGET hecl-full PROPERTY VS_WINRT_COMPONENT TRUE)
2017-12-06 20:09:27 -08:00
endif()