53 lines
1.1 KiB
CMake
53 lines
1.1 KiB
CMake
add_library(spslr_randomizer STATIC
|
|
src/spslr_randomizer.c
|
|
)
|
|
|
|
target_include_directories(spslr_randomizer PUBLIC
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
|
|
)
|
|
|
|
target_compile_options(spslr_randomizer PRIVATE
|
|
-Wall
|
|
-Wextra
|
|
-Werror
|
|
-Wmissing-prototypes
|
|
-Wstrict-prototypes
|
|
-Wold-style-definition
|
|
-Wmissing-declarations
|
|
)
|
|
|
|
set_target_properties(spslr_randomizer PROPERTIES
|
|
C_STANDARD 11
|
|
C_STANDARD_REQUIRED YES
|
|
C_EXTENSIONS YES
|
|
)
|
|
|
|
add_library(spslr_selfpatch STATIC src/spslr.c src/spslr_randomizer.c src/spslr_env.c)
|
|
|
|
target_link_libraries(spslr_selfpatch PUBLIC spslr_randomizer)
|
|
|
|
target_include_directories(spslr_selfpatch PUBLIC
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
|
$<INSTALL_INTERFACE:include>
|
|
)
|
|
|
|
target_compile_options(spslr_selfpatch PRIVATE
|
|
-Wall
|
|
-Wextra
|
|
-Werror
|
|
-Wmissing-prototypes
|
|
-Wstrict-prototypes
|
|
-Wold-style-definition
|
|
-Wmissing-declarations
|
|
)
|
|
|
|
set_target_properties(spslr_selfpatch PROPERTIES
|
|
C_STANDARD 11
|
|
C_STANDARD_REQUIRED YES
|
|
C_EXTENSIONS YES
|
|
)
|
|
|
|
target_include_directories(spslr_patchcompile PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src) # For spslr_list.h
|
|
|
|
add_subdirectory(test)
|