Ticket #42840: patch-SHARED_BUNDLE_flag.diff

File patch-SHARED_BUNDLE_flag.diff, 4.0 KB (added by RJVB (René Bertin), 10 years ago)

patch to address the issue in cmake 3.0 (and higher, I hope)

  • ./Modules/Platform/Darwin-Clang.cmake

    old new  
    2121macro(__darwin_compiler_clang lang)
    2222  set(CMAKE_${lang}_VERBOSE_FLAG "-v -Wl,-v") # also tell linker to print verbose output
    2323  set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names")
    24   set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "-bundle -Wl,-headerpad_max_install_names")
     24  #set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "-bundle -Wl,-headerpad_max_install_names")
     25  set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names")
    2526  set(CMAKE_${lang}_SYSROOT_FLAG "-isysroot")
    2627  set(CMAKE_${lang}_OSX_DEPLOYMENT_TARGET_FLAG "-mmacosx-version-min=")
    2728endmacro()
  • ./Modules/Platform/Darwin-GNU.cmake

    old new  
    2222  set(CMAKE_${lang}_VERBOSE_FLAG "-v -Wl,-v") # also tell linker to print verbose output
    2323  # GNU does not have -shared on OS X
    2424  set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names")
    25   set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "-bundle -Wl,-headerpad_max_install_names")
     25  #set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "-bundle -Wl,-headerpad_max_install_names")
     26  set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names")
    2627endmacro()
    2728
    2829macro(cmake_gnu_set_sysroot_flag lang)
  • ./Modules/Platform/Darwin-Intel.cmake

    old new  
    2121macro(__darwin_compiler_intel lang)
    2222  set(CMAKE_${lang}_VERBOSE_FLAG "-v -Wl,-v") # also tell linker to print verbose output
    2323  set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names")
    24   set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "-bundle -Wl,-headerpad_max_install_names")
     24  #set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "-bundle -Wl,-headerpad_max_install_names")
     25  set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names")
    2526
    2627  if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 12.0)
    2728    set(CMAKE_${lang}_COMPILE_OPTIONS_VISIBILITY "-fvisibility=")
  • ./Modules/Platform/Darwin-XL-C.cmake

    old new  
    11set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-qmkshrobj")
    2 set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle")
     2#set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle")
     3set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-dynamiclib")
    34
    45# Enable shared library versioning.
    56set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-install_name")
  • ./Modules/Platform/Darwin-XL-CXX.cmake

    old new  
    11set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-qmkshrobj")
    2 set(CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS "-bundle")
     2#set(CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS "-bundle")
     3set(CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS "-dynamiclib")
    34
    45# Enable shared library versioning.
    56set(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,-install_name")
  • ./Modules/Platform/Darwin.cmake

    old new  
    5050
    5151set(CMAKE_PLATFORM_HAS_INSTALLNAME 1)
    5252set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names")
    53 set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle -Wl,-headerpad_max_install_names")
     53#set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle -Wl,-headerpad_max_install_names")
     54set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names")
    5455set(CMAKE_SHARED_MODULE_LOADER_C_FLAG "-Wl,-bundle_loader,")
    5556set(CMAKE_SHARED_MODULE_LOADER_CXX_FLAG "-Wl,-bundle_loader,")
    5657set(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".so" ".a")