2020-12-02 22:56:09 -06:00
|
|
|
include(CheckCCompilerFlag)
|
|
|
|
|
check_c_compiler_flag(-Wno-invalid-offsetof HAS_NO_INVALID_OFFSETOF)
|
|
|
|
|
|
2020-09-08 21:22:23 -05:00
|
|
|
file(GLOB STORM_SOURCES
|
|
|
|
|
"*.cpp"
|
2020-11-15 13:20:10 -06:00
|
|
|
"hash/*.cpp"
|
2020-11-14 17:18:49 -06:00
|
|
|
"string/*.cpp"
|
2020-09-09 00:45:46 -05:00
|
|
|
"thread/*.cpp"
|
2020-09-08 21:22:23 -05:00
|
|
|
)
|
|
|
|
|
|
2020-12-02 20:04:02 -06:00
|
|
|
if(WHOA_SYSTEM_WIN)
|
2020-12-01 17:40:37 -06:00
|
|
|
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)
|
2020-09-08 21:22:23 -05:00
|
|
|
file(GLOB STORM_MAC_SOURCES
|
|
|
|
|
"mac/*.cpp"
|
|
|
|
|
"mac/*.mm"
|
2020-09-09 00:45:46 -05:00
|
|
|
"thread/mac/*.cpp"
|
|
|
|
|
"thread/mac/*.mm"
|
2020-09-08 21:22:23 -05:00
|
|
|
)
|
|
|
|
|
list(APPEND STORM_SOURCES ${STORM_MAC_SOURCES})
|
|
|
|
|
endif()
|
2020-09-07 17:00:14 -05:00
|
|
|
|
|
|
|
|
add_library(storm STATIC
|
|
|
|
|
${STORM_SOURCES}
|
|
|
|
|
)
|
2020-09-08 18:58:50 -05:00
|
|
|
|
|
|
|
|
target_include_directories(storm
|
2020-11-01 17:50:27 -06:00
|
|
|
PUBLIC
|
2020-11-01 17:45:45 -06:00
|
|
|
${PROJECT_SOURCE_DIR}
|
2020-09-08 18:58:50 -05:00
|
|
|
)
|
2020-12-02 20:04:02 -06:00
|
|
|
|
|
|
|
|
target_link_libraries(storm
|
|
|
|
|
PRIVATE
|
|
|
|
|
system
|
|
|
|
|
)
|
2020-12-02 21:45:17 -06:00
|
|
|
|
2020-12-02 22:56:09 -06:00
|
|
|
if(HAS_NO_INVALID_OFFSETOF)
|
|
|
|
|
target_compile_options(storm
|
|
|
|
|
PUBLIC
|
|
|
|
|
-Wno-invalid-offsetof
|
|
|
|
|
)
|
|
|
|
|
endif()
|