Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ elseif (UNIX)
endif()

# Set USE_CPACK option.
set(USE_CPACK OFF)
set(USE_CPACK ON)

# Install the application for the target platform.
if (WIN32)
Expand Down
2 changes: 0 additions & 2 deletions cmake/buildMacOS.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
message(STATUS "Building on macOS")

# Set macOS specific resources.
set(PLIST_MACOS "package/macos/Info.plist")
set(ICNS_MACOS "package/macos/app.icns")
Expand Down
2 changes: 0 additions & 2 deletions cmake/buildUbuntu.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
message(STATUS "Building on Unix")

# Add the executable target.
add_executable(${CMAKE_PROJECT_NAME}
${Implementation_FILES}
Expand Down
2 changes: 0 additions & 2 deletions cmake/buildWindows.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
message(STATUS "Building on Windows")

# Set windows specific resources.
set(RESOURCE_WIN32 "res/resources.rc")

Expand Down
9 changes: 9 additions & 0 deletions cmake/installMacOS.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Set the install prefix.
if (NOT USE_CPACK)
set(CMAKE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/deploy/macos" CACHE PATH "Install path prefix, prepended onto install directories." FORCE)
else()
set(CMAKE_INSTALL_PREFIX "" CACHE PATH "Install path prefix, prepended onto install directories." FORCE)
endif()

# Install the executable to the temporary directory
install(DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIR}/${CMAKE_PROJECT_NAME}.app" DESTINATION "${CMAKE_INSTALL_PREFIX}/Applications")
5 changes: 1 addition & 4 deletions cmake/packageMacOS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,10 @@ set(CPACK_PACKAGE_VERSION ${CMAKE_PROJECT_VERSION})
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${CMAKE_PROJECT_DESCRIPTION}")
set(CPACK_PACKAGE_VENDOR ${CMAKE_PROJECT_NAME})
set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION})
set(CPACK_PACKAGE_DIRECTORY "${CMAKE_SOURCE_DIR}/package/macos")
set(CPACK_PACKAGE_DIRECTORY "${CMAKE_SOURCE_DIR}/setup/macos")

# Set package generator to Apple Disk Image.
set(CPACK_GENERATOR DragNDrop)

# Include the CPack module.
include(CPack)

# Install the executable to the temporary directory
install(DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIR}/${CMAKE_PROJECT_NAME}.app" DESTINATION /Applications)