Yes, I think this is generally correct, if we can assume that the
statement we add ("set (MACOSX_BUNDLE_INFO_PLIST ...") and the contents
of the copied and modified file are correct even in CMake 2.6, which is
the minimal version we require, and in all later versions. Otherwise
we'd need to add some version checks, but that's likely not necessary.
Maybe we could check the CMake version later, so if we *know* that a
particular CMake version supports the Retina setup, then we can use the
CMake version of that file so we are future-proof in case this file is
changed in some way later.
I can't test your approach (lack of Mac OSX test equipment), but I
wonder if this works as expected. AFAICT the correct statement should read
set (MACOSX_BUNDLE_INFO_PLIST
"${CMAKE_SOURCE_DIR}/CMake/
MacOSXBundleInfo.plist.in")
unless you copied the template file into the (new) test/CMake folder
(note: CMAKE_SOURCE_DIR w/o "_CURRENT". CMAKE_SOURCE_DIR references the
root source directory, whereas CMAKE_CURRENT_SOURCE_DIR references the
_current_ source dir [1], i.e. in the case of fluid or the test
applications this would be fluid/ or test/, resp.. Note that the
proposal given in the cited link is generally correct, but in our (FLTK)
case it should be ${CMAKE_SOURCE_DIR}/CMake.
The macro in CMake/macros.cmake would only be used for all test
applications. As you know, fluid has its own CMake file, which should be
changed in a similar and obvious way. If we can use the same template
file, then I suggest to add the
MacOSXBundleInfo.plist.in in our CMake
folder as you wrote above. This should work for both cases.
[1]
https://cmake.org/Wiki/CMake_Useful_Variables