aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
blob: 4097a780454875be02be810f56d07fae847a149d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
cmake_minimum_required(VERSION 2.8.11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c11")
set(CMAKE_BUILD_TYPE Debug)
set(BUILD_EXAMPLES 0 CACHE BOOL "Build the included examples projects")

project(bowl)
add_library(bowl SHARED array.c
                        bowl.c
                        data.c
                        hash.c
                        utils.c)

target_include_directories(bowl PUBLIC ".")

################### EXAMPLES ###################

if(BUILD_EXAMPLES)
    add_executable(ex_tree examples/tree.c)
    target_link_libraries(ex_tree bowl)

    add_executable(ex_list examples/list.c)
    target_link_libraries(ex_list bowl)
endif()