diff options
author | Chris Robinson <[email protected]> | 2020-04-18 23:03:50 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-04-18 23:03:50 -0700 |
commit | 253773b3161a660f04ea4fa0dcf60e0ba7102f16 (patch) | |
tree | 540cc46a4880fcf3fe21aa51e64977f9fb870871 /CMakeLists.txt | |
parent | 643b192fd593a473c35b44f7b8ccecbcda8b71ad (diff) |
Build Oboe with hidden visibility
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 782ac46d..d02bcc17 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -993,7 +993,17 @@ set(OBOE_TARGET ) if(ANDROID) set(OBOE_SOURCE "" CACHE STRING "Source directory for Oboe.") if(OBOE_SOURCE) + # Force Oboe to build with hidden symbols. Don't want to be exporting + # them from OpenAL. + set(OLD_CXX_FLAGS ${CMAKE_CXX_FLAGS}) + check_cxx_compiler_flag(-fvisibility=hidden HAVE_VISIBILITY_HIDDEN_SWITCH) + if(HAVE_VISIBILITY_HIDDEN_SWITCH) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden") + endif() add_subdirectory(${OBOE_SOURCE} ./oboe) + set(CMAKE_CXX_FLAGS ${OLD_CXX_FLAGS}) + unset(OLD_CXX_FLAGS) + set(OBOE_TARGET oboe) else() find_package(Oboe) |