tools/CMakeLists.txt
changeset 14923 d6e21765912e
parent 13338 0b12b0d0d12c
child 15313 7e3bd4030aa5
equal deleted inserted replaced
14922:b3890f4311f7 14923:d6e21765912e
    24         else()
    24         else()
    25             set(SPARKLE_FOUND 0)
    25             set(SPARKLE_FOUND 0)
    26         endif()
    26         endif()
    27     endif()
    27     endif()
    28 
    28 
    29     #use the associated tool from the libraries we've selected
    29     get_target_property(qmake_executable Qt5::qmake IMPORTED_LOCATION)
    30     string(REGEX REPLACE "(.*)/include.*" "\\1" qt_base_dir "${QT_INCLUDE_DIR}")
    30     get_filename_component(qt_bin_dir "${qmake_executable}" DIRECTORY)
    31 
    31 
    32     #remove the ";-framework Cocoa" from the SDL2_LIBRARY variable
    32     #remove the ";-framework Cocoa" from the SDL2_LIBRARY variable
    33     string(REGEX REPLACE "(.*);-.*" "\\1" sdl_library_only "${SDL2_LIBRARY}")
    33     string(REGEX REPLACE "(.*);-.*" "\\1" sdl_library_only "${SDL2_LIBRARY}")
    34     #remove the "libSDLmain.a" from the SDL2_LIBRARY variable
    34     #remove the "libSDLmain.a" from the SDL2_LIBRARY variable
    35     string(REGEX REPLACE ".*;(.*)" "\\1" sdl_library_only "${sdl_library_only}")
    35     string(REGEX REPLACE ".*;(.*)" "\\1" sdl_library_only "${sdl_library_only}")
    43         set(engine_full_path "${frameworks_dir}/${CMAKE_SHARED_LIBRARY_PREFIX}hwengine${CMAKE_SHARED_LIBRARY_SUFFIX}")
    43         set(engine_full_path "${frameworks_dir}/${CMAKE_SHARED_LIBRARY_PREFIX}hwengine${CMAKE_SHARED_LIBRARY_SUFFIX}")
    44     else()
    44     else()
    45         set(engine_full_path "${CMAKE_INSTALL_PREFIX}/hwengine${CMAKE_EXECUTABLE_SUFFIX}")
    45         set(engine_full_path "${CMAKE_INSTALL_PREFIX}/hwengine${CMAKE_EXECUTABLE_SUFFIX}")
    46     endif()
    46     endif()
    47 
    47 
    48     #this tool is present in qt 4.5 but only if you compile from sources
    48     find_program(macdeployqt_executable NAMES macdeployqt PATHS ${qt_bin_dir})
    49     #from qt 4.6 is present also in the binary version
       
    50     find_program(macdeployqt_executable NAMES macdeployqt macdeployqt-mac PATHS ${qt_base_dir}/bin)
       
    51     if(NOT macdeployqt_executable)
    49     if(NOT macdeployqt_executable)
    52         message(FATAL_ERROR "The utility macdeployqt is required to create the bundle (seached: ${qt_base_dir})")
    50         message(FATAL_ERROR "The utility macdeployqt is required to create the bundle (searched: ${qt_bin_dir})")
    53     endif()
    51     endif()
    54 
    52 
    55     #create the .app bundle
    53     #create the .app bundle
    56     configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CreateMacBundle.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/CreateMacBundle.cmake)
    54     configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CreateMacBundle.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/CreateMacBundle.cmake)
    57     install(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/CreateMacBundle.cmake
    55     install(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/CreateMacBundle.cmake