Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BUILD_SHARED_LIBS for shared or static library build #639

Merged
merged 2 commits into from
Oct 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 BUILD_SHARED_LIBS (default=ON) to build MEOS as a shared library"
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
Loading