Skip to content

Commit eec968b

Browse files
committed
Set PROJECTM_STATIC_DEFINE in API target when building static libs
Otherwise, downstream targets/libraries such as the playlist library may try to import shared library symbols instead.
1 parent 55fb034 commit eec968b

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/api/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ generate_export_header(projectM_api
3434
EXPORT_FILE_NAME "${PROJECTM_EXPORT_HEADER}"
3535
)
3636

37+
if(NOT BUILD_SHARED_LIBS)
38+
target_compile_definitions(projectM_api
39+
INTERFACE
40+
PROJECTM_STATIC_DEFINE
41+
)
42+
endif()
43+
3744
add_library(libprojectM::API ALIAS projectM_api)
3845

3946

0 commit comments

Comments
 (0)