Skip to content

Commit 8642f9b

Browse files
committed
Easily switch between static and shared libs
Building a static lib can be invoked ala: cmake -DBUILD_SHARED_LIBS:bool=OFF Change-Id: I9fcc9817767002228a8bb485cbadec2d1995c84f Signed-off-by: Mark Nelson mnelson@redhat.com Reviewed-on: http://review.couchbase.org/81787 Reviewed-by: Sundararaman Sridharan <sundar@couchbase.com> Tested-by: Sundararaman Sridharan <sundar@couchbase.com> Reviewed-by: abhinav dangeti <abhinav@couchbase.com>
1 parent e81bbf7 commit 8642f9b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
cmake_minimum_required(VERSION 2.8.8)
22
project (ForestDB)
3+
option(BUILD_SHARED_LIBS "Build forestdb as a shared library" ON)
34

45
IF (${CMAKE_MAJOR_VERSION} GREATER 2)
56
CMAKE_POLICY(SET CMP0042 NEW)
@@ -250,7 +251,7 @@ SET(FORESTDB_UTILS_SRC
250251
${PROJECT_SOURCE_DIR}/utils/time_utils.cc
251252
${PROJECT_SOURCE_DIR}/utils/timing.cc)
252253

253-
add_library(forestdb SHARED
254+
add_library(forestdb
254255
${FORESTDB_FILE_OPS}
255256
${GETTIMEOFDAY_VS}
256257
${FORESTDB_CORE_SRC}

0 commit comments

Comments
 (0)