summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libFLAC++/CMakeLists.txt12
-rw-r--r--src/libFLAC/CMakeLists.txt13
2 files changed, 21 insertions, 4 deletions
diff --git a/src/libFLAC++/CMakeLists.txt b/src/libFLAC++/CMakeLists.txt
index d6e3dfd6..4f4a02b2 100644
--- a/src/libFLAC++/CMakeLists.txt
+++ b/src/libFLAC++/CMakeLists.txt
@@ -24,17 +24,25 @@ add_library(FLAC++
stream_encoder.cpp)
target_compile_definitions(FLAC++
PRIVATE $<$<BOOL:${BUILD_SHARED_LIBS}>:FLACPP_API_EXPORTS>
- PRIVATE $<$<BOOL:${BUILD_SHARED_LIBS}>:FLAC__USE_VISIBILITY_ATTR>
PUBLIC $<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:FLAC__NO_DLL>)
+if(NOT WIN32)
+target_compile_definitions(FLAC++
+ PRIVATE $<$<BOOL:${BUILD_SHARED_LIBS}>:FLAC__USE_VISIBILITY_ATTR>
+)
+endif()
target_include_directories(FLAC++ INTERFACE
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
target_link_libraries(FLAC++ PUBLIC FLAC)
if(BUILD_SHARED_LIBS)
set_target_properties(FLAC++ PROPERTIES
- CXX_VISIBILITY_PRESET hidden
VERSION 6.3.0
SOVERSION 6)
+if(NOT WIN32)
+ set_target_properties(FLAC++ PROPERTIES
+ CXX_VISIBILITY_PRESET hidden
+ )
+endif()
endif()
install(TARGETS FLAC++ EXPORT targets
diff --git a/src/libFLAC/CMakeLists.txt b/src/libFLAC/CMakeLists.txt
index a6e0c01b..63711cf0 100644
--- a/src/libFLAC/CMakeLists.txt
+++ b/src/libFLAC/CMakeLists.txt
@@ -97,8 +97,12 @@ endif()
target_compile_definitions(FLAC
PRIVATE $<$<BOOL:${BUILD_SHARED_LIBS}>:FLAC_API_EXPORTS>
- PRIVATE $<$<BOOL:${BUILD_SHARED_LIBS}>:FLAC__USE_VISIBILITY_ATTR>
PUBLIC $<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:FLAC__NO_DLL>)
+if(NOT WIN32)
+target_compile_definitions(FLAC
+ PRIVATE $<$<BOOL:${BUILD_SHARED_LIBS}>:FLAC__USE_VISIBILITY_ATTR>
+)
+endif()
target_include_directories(FLAC INTERFACE
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
@@ -108,10 +112,15 @@ if(TARGET Ogg::ogg)
endif()
if(BUILD_SHARED_LIBS)
set_target_properties(FLAC PROPERTIES
- C_VISIBILITY_PRESET hidden
VERSION 8.3.0
SOVERSION 8)
+if(NOT WIN32)
+ set_target_properties(FLAC PROPERTIES
+ C_VISIBILITY_PRESET hidden
+ )
endif()
+endif()
+
install(TARGETS FLAC EXPORT targets
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}/"