diff options
Diffstat (limited to 'development/libs/libbowl/CMakeLists.txt')
-rw-r--r-- | development/libs/libbowl/CMakeLists.txt | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/development/libs/libbowl/CMakeLists.txt b/development/libs/libbowl/CMakeLists.txt new file mode 100644 index 000000000000..93e5d15cec8a --- /dev/null +++ b/development/libs/libbowl/CMakeLists.txt @@ -0,0 +1,32 @@ +cmake_minimum_required(VERSION 2.8.11) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c99") +set(BUILD_EXAMPLES 0 CACHE BOOL "Build the included examples projects") +set(LINK_DYNAMIC 0 CACHE BOOL "Set the default linking behaviour to `dynamic`") + +project(bowl) +set(SRC array.c + bowl.c + data.c + hash.c + utils.c) + +if(LINK_DYNAMIC) + add_library(bowl SHARED ${SRC}) +else() + add_library(bowl STATIC ${SRC}) +endif() + +target_include_directories(bowl PUBLIC ".") + +################### EXAMPLES ################### + +if(BUILD_EXAMPLES) + add_executable(example_tree examples/tree.c) + target_link_libraries(example_tree bowl) + + add_executable(example_list examples/list.c) + target_link_libraries(example_list bowl) + + add_executable(example_hash examples/hash.c) + target_link_libraries(example_hash bowl) +endif() |