Handle a possible linker error on macOS
authorraptor <buckyballreaction@gmail.com>
Fri, 16 Aug 2019 15:03:14 -0600
changeset 15358 06e5f9ec5f8d
parent 15357 f53bfe04065e
child 15360 cf4a9632e649
Handle a possible linker error on macOS
hedgewars/CMakeLists.txt
--- a/hedgewars/CMakeLists.txt	Fri Aug 16 20:46:10 2019 +0300
+++ b/hedgewars/CMakeLists.txt	Fri Aug 16 15:03:14 2019 -0600
@@ -214,6 +214,11 @@
     set_source_files_properties(hwLibrary.pas PROPERTIES OBJECT_DEPENDS "${sourcefiles_sofar};${CMAKE_CURRENT_SOURCE_DIR}/hwengine.pas")
     add_library(hwengine SHARED hwLibrary.pas)
 else()
+    if(APPLE)
+        # Handle large linker install_names
+        add_flag_prepend(CMAKE_Pascal_FLAGS "-k-headerpad_max_install_names")
+    endif()
+
     # no need to change name here because target has same name
     set(engine_output_name "hwengine${CMAKE_EXECUTABLE_SUFFIX}")
     set(destination_dir ${target_binary_install_dir})