Skip to content

Commit

Permalink
Merge pull request #21 from s22s/feature/static-linking
Browse files Browse the repository at this point in the history
Added ability to build static library.
  • Loading branch information
runette authored Apr 5, 2024
2 parents d855a80 + 2975cf4 commit eee154e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 :
Expand Down
4 changes: 3 additions & 1 deletion source/pdal/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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}")

Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit eee154e

Please sign in to comment.