add_library(BasaltShared STATIC "") target_sources(BasaltShared PRIVATE # Sources basalt/pipe_operator.cpp basalt/math.cpp basalt/engine.cpp basalt/deliver.cpp basalt/object_loader.cpp basalt/anime_loader.cpp ) target_sources(BasaltShared PUBLIC FILE_SET HEADERS FILES # Headers basalt/char_types.hpp basalt/export_macro.hpp basalt/pipe_operator.hpp basalt/math.hpp basalt/guid.hpp basalt/engine.hpp basalt/deliver.hpp basalt/object_loader.hpp basalt/anime_loader.hpp ) target_include_directories(BasaltShared PUBLIC "$" "$" ) target_compile_definitions(BasaltShared PUBLIC $<$:BASALT_OS_WINDOWS> $<$>:BASALT_OS_POSIX> PUBLIC # Use Unicode charset on MSVC $<$:UNICODE> $<$:_UNICODE> # Fix MSVC shit $<$:_CRT_SECURE_NO_WARNINGS> $<$:_CRT_SECURE_NO_DEPRECATE> $<$:_CRT_NONSTDC_NO_WARNINGS> $<$:_CRT_NONSTDC_NO_DEPRECATE> # Fix Windows header file shit $<$:WIN32_LEAN_AND_MEAN> $<$:NOMINMAX> ) target_compile_options(BasaltShared PUBLIC $<$:/utf-8> $<$:/Zc:preprocessor> $<$:/Zc:__cplusplus> ) install(TARGETS BasaltShared EXPORT BasaltSharedTargets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} FILE_SET HEADERS DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} )