steveire / grantlee

Libraries for text templating with Qt
Other
141 stars 48 forks source link

saving libs in grantlee/major.minor/ folder causes packaging issues on macOS #64

Open wrobelda opened 4 years ago

wrobelda commented 4 years ago

Your cmake puts some of the libs in a lib/grantlee/major.minor folder. I don't think it is a good practice on any platform and that all libraries should be instead versioned via their actual filenames (accompanied by a generic symlink), not via their parent folder's name. However, it in particular causes the macOS packaging to fail due to limitations imposed by Xcode codesign tool:

(...) If you do do this, do not use periods in the directory names. The code signing machinery interprets directories with periods in their names as code bundles and will reject them if they don't conform to the expected code bundle layout

(per: https://developer.apple.com/library/archive/technotes/tn2206/_index.html#//apple_ref/doc/uid/DTS40007919-CH1-TNTAG201)

Also see following for reference: https://bugs.kde.org/show_bug.cgi?id=419272 https://bugs.kde.org/show_bug.cgi?id=420351 https://stackoverflow.com/questions/37737829/codesign-osx-app-bundle-with-periods-in-macos-directory-names

A proposed solution is to add a version number to the libraries filenames or at least use an underscore in place of a dot in Grantlee5_MAJOR_MINOR_VERSION_STRING variable

wrobelda commented 4 years ago

I just realized that grantlee was promoted to KDE framework back in December. I had filed the same issue with KDE bugzilla already (https://bugs.kde.org/show_bug.cgi?id=420351), to which you have been already assigned to it, so I am closing out this one.

wrobelda commented 4 years ago

Re-opening after having learned that the KDE/grantlee had not eventually become the official repo.