diff --git a/CMakeLists.txt b/CMakeLists.txt index ee2b9ad7..344e0ef8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -342,7 +342,8 @@ if(APPLE) file(APPEND ${mac_startup} "NGSuite_RESOURCES=\"$NGSuite_BUNDLE/Contents/Resources\"\n") file(APPEND ${mac_startup} "export DYLD_LIBRARY_PATH=$NGSuite_RESOURCES/lib:$DYLD_LIBRARY_PATH\n") file(APPEND ${mac_startup} "export NETGENDIR=$NGSuite_RESOURCES/bin\n") - file(APPEND ${mac_startup} "$NGSuite_RESOURCES/bin/netgen\n") + file(APPEND ${mac_startup} "cd $NGSuite_RESOURCES\n") + file(APPEND ${mac_startup} "$NGSuite_RESOURCES/bin/netgen\n") install(PROGRAMS ${mac_startup} DESTINATION bin) set(mac_ngsuite ${CMAKE_CURRENT_BINARY_DIR}/ngsuite.sh) @@ -350,7 +351,7 @@ if(APPLE) file(APPEND ${mac_ngsuite} "NGSuite_BUNDLE=\"`echo \"$0\" | sed -e 's/\\/Contents\\/MacOS\\/NGSuite//'`\"\n") file(APPEND ${mac_ngsuite} "NGSuite_RESOURCES=\"$NGSuite_BUNDLE/Contents/Resources\"\n") file(APPEND ${mac_ngsuite} "open -a /Applications/Utilities/Terminal.app $NGSuite_RESOURCES/bin/startup.sh\n") - set(CPACK_BUNDLE_STARTUP_COMMAND ${mac_ngsuit}) + set(CPACK_BUNDLE_STARTUP_COMMAND ${mac_ngsuite}) set(mac_plist ${CMAKE_CURRENT_BINARY_DIR}/Info.plist) file(WRITE ${mac_plist} "\n")