From 621ba1fd04bae0a450da91887308a5647f071892 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 12 Nov 2013 16:32:14 -0500 Subject: [PATCH] cmake-gui: Parse Copyright.txt instead of duplicating notice Set the cmake-gui MACOSX_BUNDLE_COPYRIGHT property by parsing the copyright notice line out of Copyright.txt instead of duplicating it. --- Source/QtDialog/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt index 88a9fc987..ee0b831ee 100644 --- a/Source/QtDialog/CMakeLists.txt +++ b/Source/QtDialog/CMakeLists.txt @@ -111,12 +111,15 @@ if(Qt_BIN_DIR) endif() if(APPLE) + file(STRINGS "${CMake_SOURCE_DIR}/Copyright.txt" copyright_line + LIMIT_COUNT 1 REGEX "^Copyright 2000-20[0-9][0-9] Kitware") + set_target_properties(cmake-gui PROPERTIES OUTPUT_NAME ${CMAKE_BUNDLE_NAME} MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in" MACOSX_BUNDLE_SHORT_VERSION_STRING "${CMAKE_BUNDLE_VERSION}" # TBD: MACOSX_BUNDLE_BUNDLE_VERSION "${CMAKE_BUNDLE_VERSION}" - MACOSX_BUNDLE_COPYRIGHT "Copyright 2000-2013 Kitware, Inc." + MACOSX_BUNDLE_COPYRIGHT "${copyright_line}" ) # Create a symlink in the build tree to provide a "cmake-gui" next