aboutsummaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorKO Myung-Hun <[email protected]>2017-10-20 13:43:40 +0900
committerMatthew Gregan <[email protected]>2017-10-24 15:31:45 +1300
commitede79a76eea32aa46096ee8ae5f284df590bfb17 (patch)
treee07c14f4a6bb54eea64bba1d74db35e947349414 /CMakeLists.txt
parentc2bd582fbf3c5491c27fc29ed7b4a4ff560482dd (diff)
downloadcubeb-ede79a76eea32aa46096ee8ae5f284df590bfb17.tar.gz
cubeb-ede79a76eea32aa46096ee8ae5f284df590bfb17.zip
os2: disable visibility attribute
On OS/2, visibility attribute is not supported.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt17
1 files changed, 10 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 801396e..1c4b1aa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,9 +39,12 @@ if(BUILD_TESTS)
endif()
endif()
-set(CMAKE_C_VISIBILITY_PRESET hidden)
-set(CMAKE_CXX_VISIBILITY_PRESET hidden)
-set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
+# On OS/2, visibility attribute is not supported.
+if(NOT OS2)
+ set(CMAKE_C_VISIBILITY_PRESET hidden)
+ set(CMAKE_CXX_VISIBILITY_PRESET hidden)
+ set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
+endif()
set(CMAKE_CXX_WARNING_LEVEL 4)
if(NOT MSVC)
@@ -57,8 +60,8 @@ add_library(cubeb
src/cubeb_log.cpp
src/cubeb_strings.c
$<TARGET_OBJECTS:speex>)
-target_include_directories(cubeb
- PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>
+target_include_directories(cubeb
+ PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>
)
target_include_directories(cubeb PRIVATE src)
target_compile_definitions(cubeb PRIVATE OUTSIDE_SPEEX)
@@ -70,7 +73,7 @@ add_sanitizers(cubeb)
include(GenerateExportHeader)
generate_export_header(cubeb EXPORT_FILE_NAME ${CMAKE_BINARY_DIR}/exports/cubeb_export.h)
-target_include_directories(cubeb
+target_include_directories(cubeb
PUBLIC $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/exports>
)
@@ -90,7 +93,7 @@ configure_package_config_file(
)
install(TARGETS cubeb
- EXPORT "${PROJECT_NAME}Targets"
+ EXPORT "${PROJECT_NAME}Targets"
DESTINATION ${CMAKE_INSTALL_PREFIX}
LIBRARY DESTINATION "lib"
ARCHIVE DESTINATION "lib"