From a6b092e4c64bb3a48f7d8d7824c22729ac76a7d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rg=20Prei=C3=9F?= Date: Fri, 17 Mar 2017 07:55:22 +0100 Subject: [PATCH] Setup on Mac, must use cpack params to set vars --- .gitignore | 2 ++ build.sh | 8 +++++--- src/CMakeLists.txt | 7 ++++++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index d065f11..890d19b 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,5 @@ src/common/version.h src/build src/version.h src/win/launchy.rc +Makefile.Debug +Makefile.Release diff --git a/build.sh b/build.sh index e680471..fa6d201 100755 --- a/build.sh +++ b/build.sh @@ -19,12 +19,14 @@ fi #if [[ $platform == 'lin' ]]; then # sh -x setup/linux/create-.sh if [[ $platform == 'mac' ]]; then - cd ../../setup - cpack -G Bundle -C cpack.mac + cpack -D CPACK_BUNDLE_NAME=Launchy -D CPACK_BUNDLE_PLIST=../mac/Info.plist -D CPACK_BUNDLE_ICON=../Launchy.ico + #cd ../../setup + #cpack -G Bundle -C cpack.mac #elif [[ $platform == 'bsd' ]]; then # sh -x setup/bsd/create-setup.sh +elif + cpack fi -cpack #$platform='unknown' diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8803258..e5230e6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -27,6 +27,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Windows") elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") set(__LIN__ TRUE) elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + message (STATUS "In Mac mode") set(__MAC__ TRUE) elseif (${CMAKE_SYSTEM_NAME} MATCHES "BSD") set(__BSD__ TRUE) @@ -83,7 +84,7 @@ elseif(__BSD__) set(PREFIX_MENU ${PREFIX}/share/menu) set(PREFIX_PIXMAPS ${PREFIX}/share/pixmaps) else() - message (STATUS "Windows") + message (STATUS "Windows or Mac") set(PREFIX_BIN .) set(PREFIX .) set(PREFIX_PLUGINS ${PREFIX}) @@ -149,7 +150,10 @@ if(__WIN__) Delete \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Launchy.lnk\\\" " ) elseif(__MAC__) + message (STATUS "Bundle name is" ${CPACK_BUNDLE_NAME}) + message (STATUS "Package name is" ${CPACK_PACKAGE_NAME}) set(CPACK_GENERATOR "Bundle") + set(CPACK_BUNDLE_NAME, "Launchy") set(CPACK_PACKAGE_VERSION, "1.0") set(CPACK_PACKAGE_FILE_NAME, "Launchy-Setup") set(CPACK_PACKAGE_ICON, "${CMAKE_CURRENT_SOURCE_DIR}/Launchy.ico") @@ -189,3 +193,4 @@ include(CPack) # http://yanivresearch.info/software/CPackWindowsTutorial/CPackForWindows.html # https://schneide.wordpress.com/2013/02/11/build-a-rpm-package-using-cmake/ # http://blog.beuc.net/posts/Build_a_SFML_project_with_CMake/ +# https://github.com/biometrics/openbr/blob/master/share/openbr/example/CMakeLists.txt \ No newline at end of file