Skip to content

Commit 016d4fa

Browse files
committed
CMake: Use plain add_library
1 parent 4666b29 commit 016d4fa

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

CMakeLists.txt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,8 @@ os_set_flags()
4545
# macro definition located at "CMake/global_config.cmake"
4646
global_set_flags()
4747

48-
if(BUILD_SHARED_LIBS)
49-
add_library(${LRS_TARGET} SHARED "")
50-
else()
51-
add_library(${LRS_TARGET} STATIC "")
52-
endif()
48+
# If no type is given explicitly the type is STATIC or SHARED based on whether the current value of the variable [BUILD_SHARED_LIBS](https://cmake.org/cmake/help/v3.10/variable/BUILD_SHARED_LIBS.html#variable:BUILD_SHARED_LIBS) is ON
49+
add_library(${LRS_TARGET})
5350

5451
config_cxx_flags()
5552

0 commit comments

Comments
 (0)