aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt20
1 files changed, 13 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3dd2f15..93e5d15 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,14 +1,20 @@
cmake_minimum_required(VERSION 2.8.11)
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c11")
-set(CMAKE_BUILD_TYPE Debug)
+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)
-add_library(bowl SHARED array.c
- bowl.c
- data.c
- hash.c
- utils.c)
+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 ".")