Skip to content

Commit

Permalink
Always build libcds as a static library
Browse files Browse the repository at this point in the history
  • Loading branch information
PhysSong committed Oct 3, 2024
1 parent 47e6a30 commit 7ce62fe
Showing 1 changed file with 3 additions and 22 deletions.
25 changes: 3 additions & 22 deletions src/3rdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,6 @@ target_include_directories(jack_headers INTERFACE jack2/common)
ADD_SUBDIRECTORY(hiir)
ADD_SUBDIRECTORY(weakjack)

IF(WIN32 AND CMAKE_COMPILER_IS_GNUCXX)
SET(MINGW TRUE)
ENDIF()

IF(MINGW)
# Work around linking errors with MinGW
SET(CDS_LIBRARY_TYPE SHARED)
ELSE()
SET(CDS_LIBRARY_TYPE STATIC)
ENDIF()

ADD_LIBRARY(cds ${CDS_LIBRARY_TYPE}
libcds/src/init.cpp
libcds/src/hp.cpp
Expand All @@ -42,17 +31,9 @@ TARGET_INCLUDE_DIRECTORIES(cds
PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/libcds"
)

IF(CDS_LIBRARY_TYPE STREQUAL "STATIC")
TARGET_COMPILE_DEFINITIONS(cds
PUBLIC CDS_BUILD_STATIC_LIB
)
ELSE()
TARGET_COMPILE_DEFINITIONS(cds
PRIVATE CDS_BUILD_LIB
)
# Install DLL
install(TARGETS cds RUNTIME DESTINATION .)
ENDIF()
TARGET_COMPILE_DEFINITIONS(cds
PUBLIC CDS_BUILD_STATIC_LIB
)

# The lockless ring buffer library is linked as part of the core
add_library(ringbuffer OBJECT
Expand Down

0 comments on commit 7ce62fe

Please sign in to comment.