From: Thomas Debesse Date: Sat, 6 Mar 2021 23:07:02 +0000 (+0100) Subject: freebsd: enable bundling X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fnetradiant.git;a=commitdiff_plain;h=43d2201f502b383678bc1ad3ad740cfc8dfdfe07 freebsd: enable bundling Also always prevent cmake to patch rpath when bundling, this is done by library-bundler instead. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 9159a980..b0f1d013 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,7 +77,9 @@ if (BUILD_RADIANT OR BUILD_TOOLS) endif () if (BUILD_BINARIES) - if (WIN32 OR APPLE OR "${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") + if (WIN32 OR APPLE + OR "${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" + OR "${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD" ) set(BUNDLING_SUPPORTED ON) endif() @@ -385,8 +387,12 @@ if (BUILTIN_GTKGLEXT) set_target_properties(gtkglext PROPERTIES EXCLUDE_FROM_ALL ON) endif () -if (BUNDLE_LIBRARIES AND EXISTS ${BUILTINS_LIB_DIR}) - set(CMAKE_SKIP_BUILD_RPATH ON) +if (BUNDLE_LIBRARIES) + # It was required to tell cmake to not patch rpath on macos builtins. + # It was also required to tell cmake to not patch rpath on freebsd binaries. + # Patching rpath is done in library_bundler instead so we can skip this + # step entirely when bundling. + set(CMAKE_SKIP_RPATH ON) endif() if (BUILTIN_GTKTHEME_MOJAVE) diff --git a/bundle/CMakeLists.txt b/bundle/CMakeLists.txt index f899cee0..790b9189 100644 --- a/bundle/CMakeLists.txt +++ b/bundle/CMakeLists.txt @@ -7,6 +7,8 @@ elseif (APPLE) set(BUNDLE_ETC ON) elseif ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") set(BUNDLE_OS_NAME "linux") +elseif ("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD") + set(BUNDLE_OS_NAME "freebsd") else () set(BUNDLE_OS_NAME "unsupported") endif ()