Skip to content

Commit d0ff459

Browse files
authored
Merge pull request #201 from p12tic/fix-build-shared-libs-option
[cmake] Fix handling of BUILD_SHARED_LIBS option
2 parents 5e5cc5b + f4fa328 commit d0ff459

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818

1919
### Fixed
2020
- fix gcc11 ordered pointer comparison [PR](https://github.com/alicevision/CCTag/pull/191)
21+
- fix handling of BUILD_SHARED_LIBS option [PR](https://github.com/alicevision/CCTag/pull/201)
2122

2223
### Removed
2324

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ option(CCTAG_ENABLE_SIMD_AVX2 "Enable AVX2 optimizations" OFF)
2828
option(CCTAG_BUILD_TESTS "Build the unity tests" ON)
2929
option(CCTAG_BUILD_DOC "Build documentation" OFF)
3030
option(CCTAG_NO_THRUST_COPY_IF "Do not use thrust::copy_if() on GPU. There may be a bug on CUDA 7 with GTX 980, 980Ti and 1080" OFF)
31+
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
3132

3233
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake")
3334

src/applications/CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@ if(NOT CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
88

99
set(CMAKE_CXX_STANDARD 14)
1010
set(CMAKE_CXX_STANDARD_REQUIRED ON)
11-
endif()
1211

13-
# if this is used as a stand-alone project we need to tell whether to use PIC
14-
if(NOT DEFINED BUILD_SHARED_LIBS)
12+
# if this is used as a stand-alone project we need to tell whether to use PIC
1513
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
1614
set(CMAKE_POSITION_INDEPENDENT_CODE ${BUILD_SHARED_LIBS})
1715
endif()

0 commit comments

Comments
 (0)