1
0
mirror of synced 2024-09-24 11:38:26 +02:00

Fix creation of macOS bundle

Still need to find a way to handle the deps madness
This commit is contained in:
Mary 2020-12-28 23:37:51 +01:00
parent 58a65b0004
commit 20d3a84fc0

View File

@ -87,6 +87,7 @@ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DRELEASE -DIMHEX_VERSIO
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG -DIMHEX_VERSION=\"\\\"${PROJECT_VERSION}-Debug\"\\\"") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG -DIMHEX_VERSION=\"\\\"${PROJECT_VERSION}-Debug\"\\\"")
set(install_dest RUNTIME) set(install_dest RUNTIME)
set(destination_info "${CMAKE_INSTALL_BINDIR}")
if (WIN32) if (WIN32)
set(application_type WIN32) set(application_type WIN32)
@ -103,12 +104,20 @@ elseif (APPLE)
set(MACOSX_BUNDLE_LONG_VERSION_STRING ${CPACK_PACKAGE_VERSION}) set(MACOSX_BUNDLE_LONG_VERSION_STRING ${CPACK_PACKAGE_VERSION})
set(MACOSX_BUNDLE_SHORT_VERSION_STRING "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}") set(MACOSX_BUNDLE_SHORT_VERSION_STRING "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}")
set(MACOSX_BUNDLE_COPYRIGHT "Copyright © 2020 WerWolv. All rights reserved." ) set(MACOSX_BUNDLE_COPYRIGHT "Copyright © 2020 WerWolv. All rights reserved." )
set(destination_info ".")
set(install_dest BUNDLE) set(install_dest BUNDLE)
if ("${CMAKE_GENERATOR}" STREQUAL "Xcode")
set ( bundle_path "${destination_info}/${CMAKE_BUILD_TYPE}/imhex.app" )
else ()
set ( bundle_path "${destination_info}/imhex.app" )
endif()
# FIXME: Remove this once we move/integrate the plugins directory.
install(DIRECTORY DESTINATION "${bundle_path}/Contents/MacOS/plugins")
endif() endif()
endif() endif()
add_executable(imhex add_executable(imhex ${application_type}
${application_type}
source/main.cpp source/main.cpp
source/window.cpp source/window.cpp
@ -154,4 +163,4 @@ elseif (UNIX)
target_link_libraries(imhex magic crypto ${CMAKE_DL_LIBS} capstone LLVMDemangle imgui libimhex ${Python_LIBRARIES} nlohmann_json::nlohmann_json dl) target_link_libraries(imhex magic crypto ${CMAKE_DL_LIBS} capstone LLVMDemangle imgui libimhex ${Python_LIBRARIES} nlohmann_json::nlohmann_json dl)
endif() endif()
install(TARGETS imhex ${install_dest} DESTINATION ${CMAKE_INSTALL_BINDIR}) install(TARGETS imhex ${install_dest} DESTINATION "${destination_info}")