5 # macdeployqt will convert safely any absolute path library for 'hedgewars' |
5 # macdeployqt will convert safely any absolute path library for 'hedgewars' |
6 execute_process(COMMAND ${macdeployqt_executable} ${CMAKE_BINARY_DIR}/Hedgewars.app OUTPUT_QUIET ERROR_QUIET) |
6 execute_process(COMMAND ${macdeployqt_executable} ${CMAKE_BINARY_DIR}/Hedgewars.app OUTPUT_QUIET ERROR_QUIET) |
7 |
7 |
8 if(NOT ${NOVIDEOREC}) |
8 if(NOT ${NOVIDEOREC}) |
9 # but macdeployqt will not work for 'hwengine'; luckily the dylibs were already updated before |
9 # but macdeployqt will not work for 'hwengine'; luckily the dylibs were already updated before |
10 execute_process(COMMAND install_name_tool -change ${FFMPEG_LIBAVCODEC} @executable_path/../Frameworks/libavcodec.dylib ${CMAKE_INSTALL_PREFIX}/hwengine) |
10 execute_process(COMMAND install_name_tool -change ${FFMPEG_LIBAVCODEC} @executable_path/../Frameworks/libavcodec.dylib ${engine_full_path}) |
11 execute_process(COMMAND install_name_tool -change ${FFMPEG_LIBAVFORMAT} @executable_path/../Frameworks/libavformat.dylib ${CMAKE_INSTALL_PREFIX}/hwengine) |
11 execute_process(COMMAND install_name_tool -change ${FFMPEG_LIBAVFORMAT} @executable_path/../Frameworks/libavformat.dylib ${engine_full_path}) |
12 execute_process(COMMAND install_name_tool -change ${FFMPEG_LIBAVUTIL} @executable_path/../Frameworks/libavutil.dylib ${CMAKE_INSTALL_PREFIX}/hwengine) |
12 execute_process(COMMAND install_name_tool -change ${FFMPEG_LIBAVUTIL} @executable_path/../Frameworks/libavutil.dylib ${engine_full_path}) |
13 endif() |
13 endif() |
14 |
14 |
15 if(NOT ${NOPNG}) |
15 if(NOT ${NOPNG}) |
16 #same here, for libpng and hwengine, let's assume the version pulled by macdeployqt is the same |
16 #same here, for libpng and hwengine, let's assume the version pulled by macdeployqt is the same |
17 #(yes libpng is pulled by macdeployqt even when NOVIDEOREC is active) |
17 #(yes libpng is pulled by macdeployqt even when NOVIDEOREC is active) |
18 execute_process(COMMAND install_name_tool -change ${PNG_LIBRARY} @executable_path/../Frameworks/${PNG_LIBNAME} ${CMAKE_INSTALL_PREFIX}/hwengine) |
18 execute_process(COMMAND install_name_tool -change ${PNG_LIBRARY} @executable_path/../Frameworks/${PNG_LIBNAME} ${engine_full_path}) |
19 endif() |
19 endif() |
20 |
20 |
21 if(doBundle EQUAL 1) |
21 if(doBundle EQUAL 1) |
22 execute_process(COMMAND cp -pPR ${sdl_library_only} ${frameworks_dir}/SDL.framework) |
22 execute_process(COMMAND cp -pPR ${sdl_library_only} ${frameworks_dir}/SDL.framework) |
23 execute_process(COMMAND cp -pPR ${SDLIMAGE_LIBRARY} ${frameworks_dir}/SDL_image.framework) |
23 execute_process(COMMAND cp -pPR ${SDLIMAGE_LIBRARY} ${frameworks_dir}/SDL_image.framework) |