build: fix macOS build issues blocking app compilation

- engine: liboakengine.dylib intentionally leaves olive::k_app_version
  to the final executable (olive-version-obj); whitelist that symbol
  with -U on Apple, where undefined symbols in dylibs are an error
  (ELF allows them by default).
- app/common/configwrapper.h: only declare the int64_t/uint64_t
  conversion/assignment overloads on Linux LP64, where they differ
  from qint64/quint64; elsewhere both are long long and the extra
  overloads are redeclarations.
This commit is contained in:
2026-07-27 17:14:56 +08:00
parent c0dcd33de0
commit 18aed979a2
2 changed files with 15 additions and 0 deletions
+8
View File
@@ -114,6 +114,14 @@ if (UNIX AND NOT APPLE)
${CMAKE_CURRENT_SOURCE_DIR}/oakengine.ver)
endif ()
# olive::k_app_version is intentionally left undefined in the shared library
# and provided by the final executable via olive-version-obj (see
# worker/CMakeLists.txt). ELF allows undefined symbols in shared libraries by
# default; the macOS linker does not, so whitelist that one symbol.
if (APPLE)
target_link_options(oakengine PRIVATE "LINKER:-U,__ZN5olive13k_app_versionE")
endif ()
# Install into the platform's standard library directory (/usr/lib,
# /usr/lib64 or the Debian multiarch path); Windows DLLs go next to the
# executables in bin.