Files
IACore/Src/IACore/CMakeLists.txt
2025-11-25 22:13:05 +05:30

30 lines
916 B
CMake

set(SRC_FILES
"imp/cpp/IACore.cpp"
"imp/cpp/Logger.cpp"
)
add_library(IACore STATIC ${SRC_FILES})
target_include_directories(IACore PUBLIC inc/)
target_include_directories(IACore PRIVATE imp/hpp/)
target_link_libraries(IACore PUBLIC tl::expected unordered_dense::unordered_dense)
if(WIN32)
target_link_libraries(IACore PUBLIC mimalloc-static)
target_link_options(IACore PUBLIC "/INCLUDE:mi_version")
else()
target_link_libraries(IACore PUBLIC mimalloc)
endif()
target_precompile_headers(IACore PUBLIC inc/IACore/PCH.hpp)
target_compile_options(IACore PRIVATE -fno-exceptions)
target_compile_options(IACore INTERFACE
$<$<NOT:$<BOOL:$<TARGET_PROPERTY:USE_EXCEPTIONS>>>:-fno-exceptions>
)
define_property(TARGET PROPERTY USE_EXCEPTIONS
BRIEF_DOCS "If ON, this target is allowed to use C++ exceptions."
FULL_DOCS "Prevents IACore from propagating -fno-exceptions to this target."
)