mirror of https://github.com/bjornbytes/lovr.git
LOVR_BUILD_WITH_EXPORTED_INTERNALS --> LOVR_SYMBOL_VISIBILITY
This commit is contained in:
parent
7b70fac0bb
commit
88de9a41af
|
@ -36,7 +36,8 @@ option(LOVR_SYSTEM_OPENXR "Use the system-provided OpenXR" OFF)
|
||||||
option(LOVR_BUILD_EXE "Build an executable (or an apk on Android)" ON)
|
option(LOVR_BUILD_EXE "Build an executable (or an apk on Android)" ON)
|
||||||
option(LOVR_BUILD_SHARED "Build a shared library (takes precedence over LOVR_BUILD_EXE)" OFF)
|
option(LOVR_BUILD_SHARED "Build a shared library (takes precedence over LOVR_BUILD_EXE)" OFF)
|
||||||
option(LOVR_BUILD_BUNDLE "On macOS, build a .app bundle instead of a raw program" OFF)
|
option(LOVR_BUILD_BUNDLE "On macOS, build a .app bundle instead of a raw program" OFF)
|
||||||
option(LOVR_BUILD_WITH_EXPORTED_INTERNALS "When building as a shared library, make all C symbols visible. This exposes internals, so be aware that any APIs you use from C may change at any time." OFF)
|
|
||||||
|
set(LOVR_SYMBOL_VISIBILITY "hidden" CACHE STRING "What should the C symbol visibility be? hidden reduces binary size, default lets other binaries use this one.")
|
||||||
|
|
||||||
# Setup
|
# Setup
|
||||||
if(EMSCRIPTEN)
|
if(EMSCRIPTEN)
|
||||||
|
@ -360,9 +361,7 @@ else()
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT LOVR_BUILD_WITH_EXPORTED_INTERNALS)
|
set_target_properties(lovr PROPERTIES C_VISIBILITY_PRESET ${LOVR_SYMBOL_VISIBILITY})
|
||||||
set_target_properties(lovr PROPERTIES C_VISIBILITY_PRESET hidden)
|
|
||||||
endif()
|
|
||||||
set_target_properties(lovr PROPERTIES C_STANDARD 99)
|
set_target_properties(lovr PROPERTIES C_STANDARD 99)
|
||||||
target_include_directories(lovr PRIVATE src src/modules src/lib/stdatomic)
|
target_include_directories(lovr PRIVATE src src/modules src/lib/stdatomic)
|
||||||
target_link_libraries(lovr
|
target_link_libraries(lovr
|
||||||
|
|
Loading…
Reference in New Issue