Allow brave/foolish souls to use internal private C API

This commit is contained in:
Nevyn Bengtsson 2021-04-05 20:25:32 +02:00 committed by Bjorn
parent ac3d873311
commit 361c6a1356
1 changed files with 4 additions and 1 deletions

View File

@ -36,6 +36,7 @@ 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_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_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)
# Setup
if(EMSCRIPTEN)
@ -357,7 +358,9 @@ else()
return()
endif()
set_target_properties(lovr PROPERTIES C_VISIBILITY_PRESET hidden)
if(NOT LOVR_BUILD_WITH_EXPORTED_INTERNALS)
set_target_properties(lovr PROPERTIES C_VISIBILITY_PRESET hidden)
endif()
set_target_properties(lovr PROPERTIES C_STANDARD 99)
target_include_directories(lovr PRIVATE src src/modules src/lib/stdatomic)
target_link_libraries(lovr