squall/storm/CMakeLists.txt

58 lines
1.1 KiB
Text
Raw Normal View History

include(CheckCXXCompilerFlag)
check_cxx_compiler_flag(-Wno-invalid-offsetof HAS_NO_INVALID_OFFSETOF)
file(GLOB STORM_SOURCES
"*.cpp"
2020-11-15 13:20:10 -06:00
"hash/*.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"
"thread/win/*.cpp"
)
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"
2020-09-09 00:45:46 -05:00
"thread/mac/*.cpp"
"thread/mac/*.mm"
)
list(APPEND STORM_SOURCES ${STORM_MAC_SOURCES})
endif()
if(WHOA_SYSTEM_LINUX)
file(GLOB STORM_LINUX_SOURCES
"linux/*.cpp"
"thread/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
PRIVATE
system
)
if(HAS_NO_INVALID_OFFSETOF)
target_compile_options(storm
PUBLIC
-Wno-invalid-offsetof
)
endif()