Skip to content

Commit

Permalink
Add BUILD_SHARED_LIBS for shared or static library build
Browse files Browse the repository at this point in the history
  • Loading branch information
mschoema committed Oct 19, 2024
1 parent 256556c commit 5453154
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion meos/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
add_definitions(-DSYSTEMTZDIR="/usr/share/zoneinfo")
message(STATUS "Directory of the time zone database: /usr/share/zoneinfo")

# Option to build MEOS as a shared or static library
option(BUILD_SHARED_LIBS
"Set to OFF to build MEOS as a static library (default is ON)"
ON
)

# Option to show debug messages for analyzing the expandable data structures
option(DEBUG_EXPAND
"Set DEBUG_EXPAND (default=OFF) to show debug messages for analyzing the
Expand Down Expand Up @@ -168,7 +174,7 @@ set(PROJECT_OBJECTS ${PROJECT_OBJECTS} "$<TARGET_OBJECTS:liblwgeom>")
set(PROJECT_OBJECTS ${PROJECT_OBJECTS} "$<TARGET_OBJECTS:ryu>")

# Build the library: All
add_library(${MEOS_LIB_NAME} SHARED ${PROJECT_OBJECTS})
add_library(${MEOS_LIB_NAME} ${PROJECT_OBJECTS})
if(APPLE)
set_target_properties(${MEOS_LIB_NAME} PROPERTIES
LINK_FLAGS "-Wl,-undefined,dynamic_lookup")
Expand Down

0 comments on commit 5453154

Please sign in to comment.