I am using CMake 3.10 I can't seems to find a way to tell the OS X bundle where to find the compiled binary.
I get the following errors: Run CPack packaging tool... CPack: Create package using Bundle CPack: Install projects CPack: - Run preinstall target for: OSXBundle CPack: - Install project: OSXBundle CPack: Create package CPack Error: Error copying $<TARGET_FILE:myapp> to /Users/nicholas/projects/OSX_BundleRPath/build/_CPack_Packages/Darwin/Bundle/OSXBundle-0.1.1-Darwin/MyApp.app/Contents/MacOS/MyApp CPack Error: Error copying startup command. Check the value of CPACK_BUNDLE_STARTUP_COMMAND. CPack Error: Problem compressing the directory CPack Error: Error when generating package: OSXBundle make: *** [package] Error 1 I have the following CMakeLists.txt: CMAKE_MINIMUM_REQUIRED(VERSION 3.8) PROJECT (OSXBundle) FIND_PACKAGE (Boost REQUIRED) ADD_EXECUTABLE (myapp src/main.cpp ) INSTALL ( TARGETS myapp DESTINATION ./bin ) IF (APPLE) # GET_TARGET_PROPERTY ( APP_LOCATION myapp LOCATION ) SET ( APP_LOCATION "$<TARGET_FILE:myapp>" ) SET ( CPACK_BUNDLE_NAME "MyApp" ) SET ( CPACK_GENERATOR "Bundle" ) SET ( CPACK_BUNDLE_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/resources/Info.plist ) SET ( CPACK_BUNDLE_ICON ${CMAKE_CURRENT_SOURCE_DIR}/resources/MyApp.icns ) SET ( CPACK_PACKAGE_ICON ${CMAKE_CURRENT_SOURCE_DIR}/resources/MyApp.icns ) SET ( CPACK_BUNDLE_STARTUP_COMMAND ${APP_LOCATION} ) ENDIF () INCLUDE ( CPack )
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake