From 3069aa92caa2905b7c65da6f2847427291e7a56c Mon Sep 17 00:00:00 2001 From: scheffle Date: Wed, 11 May 2016 13:56:20 +0200 Subject: [PATCH 1/2] make app package on OS X --- share/Info.plist | 38 ++++++++++++++++++++++++++++++++++++++ src/CMakeLists.txt | 10 ++++++++++ 2 files changed, 48 insertions(+) create mode 100644 share/Info.plist diff --git a/share/Info.plist b/share/Info.plist new file mode 100644 index 00000000..e2322bf7 --- /dev/null +++ b/share/Info.plist @@ -0,0 +1,38 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + juCi++ + CFBundleGetInfoString + + CFBundleIconFile + + CFBundleIdentifier + com.github.cppit.juci + CFBundleInfoDictionaryVersion + 6.0 + CFBundleLongVersionString + + CFBundleName + juci + CFBundlePackageType + APPL + CFBundleShortVersionString + + CFBundleSignature + ???? + CFBundleVersion + + CSResourcesFileMapped + + LSRequiresCarbon + + NSHumanReadableCopyright + + NSHighResolutionCapable + + + diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 86bf9613..01d05d13 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -155,3 +155,13 @@ if(DOXYGEN_FOUND) COMMENT "Generating API documentation with Doxygen to ${CMAKE_CURRENT_BINARY_DIR}" VERBATIM ) endif(DOXYGEN_FOUND) + +if(APPLE) + get_filename_component(InfoPlistFile "../share/Info.plist" ABSOLUTE) + set(APP_PROPERTIES + MACOSX_BUNDLE TRUE + MACOSX_BUNDLE_INFO_PLIST ${InfoPlistFile} + OUTPUT_NAME "juCi++" + ) + set_target_properties(${project_name} PROPERTIES ${APP_PROPERTIES}) +endif() \ No newline at end of file From bf9bfa12f5a10ea0fdfb7accedb6bd299f8543da Mon Sep 17 00:00:00 2001 From: scheffle Date: Sun, 15 May 2016 14:42:21 +0200 Subject: [PATCH 2/2] add symlink of executable inside app package for terminal usage --- src/CMakeLists.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 01d05d13..e65cc813 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -157,6 +157,7 @@ if(DOXYGEN_FOUND) endif(DOXYGEN_FOUND) if(APPLE) + # setup Application Package get_filename_component(InfoPlistFile "../share/Info.plist" ABSOLUTE) set(APP_PROPERTIES MACOSX_BUNDLE TRUE @@ -164,4 +165,11 @@ if(APPLE) OUTPUT_NAME "juCi++" ) set_target_properties(${project_name} PROPERTIES ${APP_PROPERTIES}) -endif() \ No newline at end of file + # add symlink of executable inside app package for terminal usage + set(TARGET_FILE $) + set(TARGET_FILE_DIR $) + add_custom_command(TARGET ${project_name} + POST_BUILD + COMMAND ln -sf "${TARGET_FILE}" "${TARGET_FILE_DIR}/../../../juci" + ) +endif()