Skip to content

Commit e40b852

Browse files
authored
[CMakeLists.txt] Adding standard BUILD_SHARED_LIBS to allow static library compilation.
1 parent 68f21ab commit e40b852

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Updated 2025.05 to 3.10 since compatibility with CMake < 3.10 will be removed from a future version of CMake.
22
CMAKE_MINIMUM_REQUIRED(VERSION 3.10)
3+
# https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html
4+
option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
35

46
if(WIN32)
57
set(CMAKE_TOOLCHAIN_FILE C:/vcpkg/scripts/buildsystems/vcpkg.cmake)
@@ -41,7 +43,7 @@ endif()
4143
# As of 2025.05, Not using GLOB_RECURSE as it's explicitly discouraged.
4244
# https://stackoverflow.com/questions/3201154/automatically-add-all-files-in-a-folder-to-a-target-using-cmake
4345
# https://cmake.org/cmake/help/latest/command/file.html#filesystem
44-
ADD_LIBRARY(dqrobotics SHARED
46+
ADD_LIBRARY(dqrobotics
4547
src/DQ.cpp
4648

4749
src/internal/_dq_linesegment.cpp

0 commit comments

Comments
 (0)