Skip to content

Commit eee154e

Browse files
authored
Merge pull request #21 from s22s/feature/static-linking
Added ability to build static library.
2 parents d855a80 + 2975cf4 commit eee154e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ make
136136
make install
137137
```
138138

139+
Setting `-DBUILD_SHARED_LIBS=OFF` enables the generation of a static (`.a`) library.
140+
139141
## Code Style
140142

141143
This project enforces the PDAL code styles, which can checked as follows :

source/pdal/CMakeLists.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
set(TARGET pdalc)
22

3+
option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
4+
35
find_package(PDAL REQUIRED CONFIG)
46
message(STATUS "Found PDAL ${PDAL_VERSION}")
57

@@ -38,7 +40,7 @@ include_directories(
3840

3941
add_definitions(${PDAL_DEFINITIONS})
4042

41-
add_library(${TARGET} SHARED ${SOURCES} ${HEADERS})
43+
add_library(${TARGET} ${SOURCES} ${HEADERS})
4244

4345
string(TOUPPER "${TARGET}_BUILD_DLL" BUILD_SYMBOL)
4446

0 commit comments

Comments
 (0)