diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 17 |
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" |