Skip to content

Commit

Permalink
Set copyright year in MacOSBundle.cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
daljit46 committed Jun 6, 2024
1 parent b053f7c commit f4bee41
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ project(mrtrix3 LANGUAGES CXX VERSION 3.0.4)

include(GNUInstallDirs)

string(TIMESTAMP CURRENT_YEAR "%Y")

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

set(MRTRIX_BASE_VERSION "${CMAKE_PROJECT_VERSION}")
Expand Down
3 changes: 3 additions & 0 deletions cmake/MacOSBundle.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ function(set_bundle_properties executable_name)
set(mrtrix_icon_macos ${CMAKE_CURRENT_SOURCE_DIR}/../icons/macos/${executable_name}.icns)
endif()

string(TIMESTAMP CURRENT_YEAR "%Y")
set(COPYRIGHT_YEAR "2008-${CURRENT_YEAR}" CACHE STRING "Copyright year")

target_sources(${executable_name} PRIVATE ${mrtrix_icon_macos})
set_target_properties(${executable_name} PROPERTIES
MACOSX_BUNDLE TRUE
Expand Down
4 changes: 2 additions & 2 deletions packaging/macos/bundle/mrview.plist.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<key>CFBundlePackageType</key> <string>APPL</string>
<key>CFBundleShortVersionString</key> <string>${PROJECT_VERSION}</string>
<key>CFBundleVersion</key> <string>${PROJECT_VERSION}</string>
<key>NSHumanReadableCopyright</key> <string>Copyright (c) 2008-${CURRENT_YEAR} the MRtrix3 contributors</string>
<key>NSHumanReadableCopyright</key> <string>Copyright (c) ${COPYRIGHT_YEAR} the MRtrix3 contributors</string>
<key>LSMinimumSystemVersion</key> <string>${CMAKE_OSX_DEPLOYMENT_TARGET}</string>
<key>LSBackgroundOnly</key> <string>0</string>
<key>NSHighResolutionCapable</key> <true/>
Expand Down Expand Up @@ -153,4 +153,4 @@

</array>
</dict>
</plist>
</plist>
2 changes: 1 addition & 1 deletion packaging/macos/bundle/shview.plist.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<key>CFBundlePackageType</key> <string>APPL</string>
<key>CFBundleShortVersionString</key> <string>${PROJECT_VERSION}</string>
<key>CFBundleVersion</key> <string>${PROJECT_VERSION}</string>
<key>NSHumanReadableCopyright</key> <string>Copyright (c) 2008-${CURRENT_YEAR} the MRtrix3 contributors</string>
<key>NSHumanReadableCopyright</key> <string>Copyright (c) ${COPYRIGHT_YEAR} the MRtrix3 contributors</string>
<key>LSMinimumSystemVersion</key> <string>${CMAKE_OSX_DEPLOYMENT_TARGET}</string>
<key>LSBackgroundOnly</key> <string>0</string>
<key>NSHighResolutionCapable</key> <true/>
Expand Down

0 comments on commit f4bee41

Please sign in to comment.