squall/storm/CMakeLists.txt

70 lines
1.3 KiB
Text
Raw Normal View History

include(CheckCXXCompilerFlag)
check_cxx_compiler_flag(-Wno-invalid-offsetof HAS_NO_INVALID_OFFSETOF)
file(GLOB STORM_SOURCES
"*.cpp"
2023-01-23 22:10:24 -06:00
"big/*.cpp"
2023-03-23 12:48:16 -05:00
"crypto/*.cpp"
2023-03-23 12:51:42 -05:00
"error/*.cpp"
2020-11-15 13:20:10 -06:00
"hash/*.cpp"
"option*/*.cpp"
"queue/*.cpp"
2020-11-14 17:18:49 -06:00
"string/*.cpp"
2020-09-09 00:45:46 -05:00
"thread/*.cpp"
)
2020-12-02 20:04:02 -06:00
if(WHOA_SYSTEM_WIN)
file(GLOB STORM_WIN_SOURCES
"win/*.cpp"
"error/win/*.cpp"
2023-03-23 12:51:42 -05:00
"thread/win/*.cpp"
"registry/win/*.cpp"
2023-03-23 12:51:42 -05:00
)
list(APPEND STORM_SOURCES ${STORM_WIN_SOURCES})
endif()
2020-12-02 20:04:02 -06:00
if(WHOA_SYSTEM_MAC)
file(GLOB STORM_MAC_SOURCES
"mac/*.cpp"
"mac/*.mm"
"error/unix/*.cpp"
2020-09-09 00:45:46 -05:00
"thread/mac/*.cpp"
"thread/mac/*.mm"
"registry/mac/*.mm"
)
list(APPEND STORM_SOURCES ${STORM_MAC_SOURCES})
endif()
if(WHOA_SYSTEM_LINUX)
file(GLOB STORM_LINUX_SOURCES
"linux/*.cpp"
"error/unix/*.cpp"
"thread/linux/*.cpp"
"registry/linux/*.cpp"
)
list(APPEND STORM_SOURCES ${STORM_LINUX_SOURCES})
endif()
add_library(storm STATIC
${STORM_SOURCES}
)
target_include_directories(storm
PUBLIC
2020-11-01 17:45:45 -06:00
${PROJECT_SOURCE_DIR}
)
2020-12-02 20:04:02 -06:00
target_link_libraries(storm
2023-08-04 20:59:35 -04:00
PUBLIC
bc
2020-12-02 20:04:02 -06:00
PRIVATE
system
)
if(HAS_NO_INVALID_OFFSETOF)
target_compile_options(storm
PUBLIC
-Wno-invalid-offsetof
)
endif()