From d34e6fcbbec6f2d5feaf4c795277cdc73cabe3b9 Mon Sep 17 00:00:00 2001 From: "Simeon H.K. Fitch" Date: Wed, 13 Mar 2024 17:11:02 -0400 Subject: [PATCH 1/2] Added ability to build static library. --- source/pdal/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/pdal/CMakeLists.txt b/source/pdal/CMakeLists.txt index 0a2e82b..a8648e0 100644 --- a/source/pdal/CMakeLists.txt +++ b/source/pdal/CMakeLists.txt @@ -1,5 +1,7 @@ set(TARGET pdalc) +option(BUILD_SHARED_LIBS "Build using shared libraries" ON) + find_package(PDAL REQUIRED CONFIG) message(STATUS "Found PDAL ${PDAL_VERSION}") @@ -38,7 +40,7 @@ include_directories( add_definitions(${PDAL_DEFINITIONS}) -add_library(${TARGET} SHARED ${SOURCES} ${HEADERS}) +add_library(${TARGET} ${SOURCES} ${HEADERS}) string(TOUPPER "${TARGET}_BUILD_DLL" BUILD_SYMBOL) From 2975cf4a9e2fb57482cbc80a253ce6e8128dfae0 Mon Sep 17 00:00:00 2001 From: "Simeon H.K. Fitch" Date: Thu, 4 Apr 2024 15:59:02 -0400 Subject: [PATCH 2/2] Added static linking instructions --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index c67ed58..ddeee4d 100644 --- a/README.md +++ b/README.md @@ -136,6 +136,8 @@ make make install ``` +Setting `-DBUILD_SHARED_LIBS=OFF` enables the generation of a static (`.a`) library. + ## Code Style This project enforces the PDAL code styles, which can checked as follows :