Cache variable BUILD_SHARED_LIBS
This commit is contained in:
parent
b6e04c7d38
commit
9bc6befee7
2 changed files with 17 additions and 8 deletions
12
CHANGES.md
12
CHANGES.md
|
|
@ -1,5 +1,13 @@
|
||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
|
## 0.9.1
|
||||||
|
|
||||||
|
- (backwards incompatible) Add CMake cache variable `BUILD_SHARED_LIBS`.
|
||||||
|
The default is a static library for mobile (Android and iOS), and a
|
||||||
|
shared library otherwise; that is the same pattern followed by opencv.
|
||||||
|
The variable should be explicitly set to `ON` if a shared library must
|
||||||
|
be created, and `OFF` if a static library must be created.
|
||||||
|
|
||||||
## 0.9.0
|
## 0.9.0
|
||||||
|
|
||||||
- Forked to the DkML repository on GitLab.
|
- Forked to the DkML repository on GitLab.
|
||||||
|
|
@ -11,7 +19,9 @@
|
||||||
- Wrap macro parameters in the `capnp_use(x)` macro. Passes clang-tidy (not
|
- Wrap macro parameters in the `capnp_use(x)` macro. Passes clang-tidy (not
|
||||||
a false positive)
|
a false positive)
|
||||||
- Add POSITION_INDEPENDENT_CODE to CapnC::Runtime
|
- Add POSITION_INDEPENDENT_CODE to CapnC::Runtime
|
||||||
- Add C_CAPNPROTO_ENABLE_INSTALL with default ON to enable cmake --install
|
- Add C_CAPNPROTO_ENABLE_INSTALL with default ON to turn off and on
|
||||||
|
installation of targets and files in `cmake --install`, especially for when
|
||||||
|
this project is used within a FetchContent() command.
|
||||||
|
|
||||||
## 0.3 (632f0d73a1f4a03026b5e4727386b9fe3ec6e00e)
|
## 0.3 (632f0d73a1f4a03026b5e4727386b9fe3ec6e00e)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,13 +24,12 @@ if(APPLE)
|
||||||
set(CMAKE_MACOSX_RPATH OFF)
|
set(CMAKE_MACOSX_RPATH OFF)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Boilerplate DK CMAKE PROJ 2023-05-17.2
|
# Boilerplate DK CMAKE PROJ 2023-09-25.1
|
||||||
if(BUILD_SHARED_LIBS)
|
set(default_build_shared)
|
||||||
# SHARED is implied by BUILD_SHARED_LIBS=ON
|
if(NOT (ANDROID OR IOS))
|
||||||
set(linkage)
|
set(default_build_shared ON)
|
||||||
else()
|
|
||||||
set(linkage STATIC)
|
|
||||||
endif()
|
endif()
|
||||||
|
option(BUILD_SHARED_LIBS "Build shared libraries (.dll/.so) instead of static ones (.lib/.a)" ${default_build_shared})
|
||||||
|
|
||||||
# Build hygiene: Tools for keeping the source code clean. By default
|
# Build hygiene: Tools for keeping the source code clean. By default
|
||||||
# we try to enforce build hygiene.
|
# we try to enforce build hygiene.
|
||||||
|
|
@ -52,7 +51,7 @@ if(NOT BUILD_HYGIENE STREQUAL DISABLED)
|
||||||
${find_program_args})
|
${find_program_args})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(CapnC_Runtime ${linkage}
|
add_library(CapnC_Runtime
|
||||||
lib/capn.c
|
lib/capn.c
|
||||||
lib/capn-malloc.c
|
lib/capn-malloc.c
|
||||||
lib/capn-stream.c
|
lib/capn-stream.c
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue