Skip to content

Commit 1ce9470

Browse files
authored
fix: fix building shared library (#188)
1 parent a65c410 commit 1ce9470

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

CMakeLists.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,15 @@ file(GLOB SD_LIB_SOURCES
6969
# we can get only one share lib
7070
if(SD_BUILD_SHARED_LIBS)
7171
message("Build shared library")
72-
set(BUILD_SHARED_LIBS OFF)
7372
message(${SD_LIB_SOURCES})
73+
set(BUILD_SHARED_LIBS OFF)
7474
add_library(${SD_LIB} SHARED ${SD_LIB_SOURCES})
7575
add_definitions(-DSD_BUILD_SHARED_LIB)
7676
target_compile_definitions(${SD_LIB} PRIVATE -DSD_BUILD_DLL)
7777
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
7878
else()
7979
message("Build static library")
80+
set(BUILD_SHARED_LIBS OFF)
8081
add_library(${SD_LIB} STATIC ${SD_LIB_SOURCES})
8182
endif()
8283

0 commit comments

Comments
 (0)