Skip to content
Snippets Groups Projects
Commit 8f4124ec authored by Pospelov, Gennady's avatar Pospelov, Gennady
Browse files

MacOS cmake: attempt to configure bundle when there is more than one cmake prefix path

parent 203284e6
No related branches found
No related tags found
No related merge requests found
......@@ -134,6 +134,14 @@ if(UNIX)
install(DIRECTORY "$ENV{QTDIR}/plugins/platforms" DESTINATION ${plugin_dest_dir} COMPONENT Runtime)
set(fixup_path @rpath)
# handling the case when cmake prefix path contains more than one entry
list(LENGTH ${CMAKE_PREFIX_PATH} len)
list(GET ${CMAKE_PREFIX_PATH} 0 cmake_prefix_path1)
if(len EQUAL 2)
list(GET ${CMAKE_PREFIX_PATH} 1 cmake_prefix_path2)
endif()
configure_file(${CMAKE_SOURCE_DIR}/cmake/modules/FixAppleBundle.cmake.in ${destination_runtime_configs}/FixAppleBundle.cmake @ONLY)
install(SCRIPT ${destination_runtime_configs}/FixAppleBundle.cmake COMPONENT Runtime)
elseif(NOT BUILD_DEBIAN)
......
set(bundle ${CMAKE_INSTALL_PREFIX}/BornAgain.app )
set(bornagain_libs ${CMAKE_INSTALL_PREFIX}/@destination_lib@)
set(thirdparty_libs ${bundle}/Contents/lib/ThirdParty)
set(cmake_prefix_path @CMAKE_PREFIX_PATH@ )
set(BU_CHMOD_BUNDLE_ITEMS True)
set(BU_COPY_FULL_FRAMEWORK_CONTENTS False)
......@@ -25,7 +24,11 @@ function(gp_resolved_file_type_override resolved_file type_var)
message("XXX_Python resolving file as system : ${file}")
set(${type_var} system PARENT_SCOPE)
elseif(file MATCHES "@CMAKE_PREFIX_PATH@")
elseif(file MATCHES "@cmake_prefix_path1@")
message("XXX_PREFFIX resolving file as _embedded : ${file}")
set(${type_var} embedded PARENT_SCOPE)
elseif(file MATCHES "@cmake_prefix_path2@")
message("XXX_PREFFIX resolving file as _embedded : ${file}")
set(${type_var} embedded PARENT_SCOPE)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment