It's not possible to compile minuet without bundle in cmake configuration
Details
Diff Detail
- Repository
- R163 Minuet
- Lint
Lint Skipped - Unit
Unit Tests Skipped
No, it should be install(TARGETS minuet ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}).
You can see how it takes care of this case in KDEInstallDirs.cmake:711
@apol doing so results in
CMake Error at src/app/CMakeLists.txt:87 (install): install TARGETS given no BUNDLE DESTINATION for MACOSX_BUNDLE executable target "minuet".
I took a look in KDEInstallDirs.cmake:711 and I can see that is sets the bundle with:
709 │ # on the Mac support an extra install directory for application bundles 710 │ if(APPLE) 711 │ set(KDE_INSTALL_TARGETS_DEFAULT_ARGS ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} 712 │ BUNDLE DESTINATION "${BUNDLE_INSTALL_DIR}" ) 713 │ set(KF5_INSTALL_TARGETS_DEFAULT_ARGS ${KF5_INSTALL_TARGETS_DEFAULT_ARGS} 714 │ BUNDLE DESTINATION "${BUNDLE_INSTALL_DIR}" ) 715 │ endif()
I did a simple test and APPLE is true in my macbook, so I don't know why and what is happening.
Patch update to reflect what I'm running here.
CMake Error at src/app/CMakeLists.txt:87 (install):
That file in master has only 85 lines, so most probably you have local changes there? If so, try to temporarly remove them, or test the change on a clean source tree.
Also, ${INSTALL_TARGETS_DEFAULT_ARGS} and ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} are the same (the non-KDE_ one is deprecated).
@pino It was a simple if(apple) message(potato) endif() to test if apple was true and the correct variable was by kdeinstalldir, with everything stashed and only this patch applied:
CMake Error at src/app/CMakeLists.txt:84 (install): install TARGETS given no BUNDLE DESTINATION for MACOSX_BUNDLE executable target "minuet".
@pino if you can, please the history if of this patch to see my first and working version.
https://phabricator.kde.org/D29077?id=80827
I don't think it is correct, ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} (or the deprecated version already in use) is the right thing to use in all the occasions.
Unfortunately I do not have any macOS knowledge, so I can only point you at KDEInstallDirs.cmake in extra-cmake-modules that sets ${BUNDLE_INSTALL_DIR}:
if(APPLE) _define_absolute(BUNDLEDIR "/Applications/KDE" "application bundles" BUNDLE_INSTALL_DIR) endif()