Reputation:
I'm very new to cmake and I'm trying to build os x application using it, the problem I've faced is that I need to specify NSPrincipalClass inside Info.plist to be able to launch it. (otherwise I'm getting "No Info.plist file in application bundle or no NSPrincipalClass in the Info.plist file" error). The problem is that there is no way to do it using cmake MACOSX_BUNDLE_xxx variables.
I probably can use some workarounds like script that will add it after building or something like this but is there a better way? I might also modify default plist template but than is there a way to include it inside project repo so there will be no need to modify it on every machine or after reinstalling cmake etc?
Upvotes: 1
Views: 1422
Reputation:
I've solved this issue. I've created my own template (file name is MacOSXBundleInfo.plist.in) put it into cmake/modules/ folder inside project root, from there the only think left is to add
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
into your CMakeLists.txt
Upvotes: 1