New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working directory in CMakeLists.txt required #344

Closed
omni6 opened this Issue Feb 11, 2019 · 6 comments

Comments

Projects
None yet
2 participants
@omni6
Copy link
Contributor

omni6 commented Feb 11, 2019

Hi @tsujan,

got an issue for the kvantum-qt5-git PKGBUILD

CMake Warning:
  No source or binary directory provided.  Both will be assumed to be the
  same as the current working directory, but note that this warning will
  become a fatal error in future CMake releases.

Here issue report for cmake:
https://gitlab.kitware.com/cmake/cmake/issues/18817

Patch for CMakeLists.txt for another application:
https://gist.github.com/ulyssesrr/d7c93e121bc9c5c7a4e0564be5e4ac21

@tsujan

This comment has been minimized.

Copy link
Owner

tsujan commented Feb 11, 2019

Backward incompatible changes in cmake again?! That's why I dislike cmake; have never seen such issues with qmake.

Thanks for letting me know about this problem and its solution! I'll investigate it as soon as I find time.

@tsujan

This comment has been minimized.

Copy link
Owner

tsujan commented Feb 12, 2019

@omni6

The problem wasn't in Kvantum's cmake file -- a standard cmake compilation works OK -- but in the AUR PKGBUILD of git kvantum: it should have made a build directory before compilation.

SOLUTION:

Please make these changes to PKGBUILD's build() and package() blocks (the last 2 blocks):

build() {
   cd ${srcdir}/${_gitname}/${_gitname}
   mkdir -p build ; cd build

   cmake .. -DCMAKE_INSTALL_PREFIX:PATH=/usr
   make
}

package() {
   cd ${srcdir}/${_gitname}/${_gitname}
   cd build

   make DESTDIR=${pkgdir}/ install
   cd ..
   install -Dm644 ChangeLog ${pkgdir}/usr/share/doc/kvantum/ChangeLog
   install -Dm644 COPYING ${pkgdir}/usr/share/licenses/kvantum/COPYING
   cp -r doc ${pkgdir}/usr/share/doc/kvantum
}

It works here without problem but please test it before making the change.

Please also close this issue after you made the change successfully! Thanks in advance!

NOTE: There may be simpler ways but the above-mentioned one seems to work.

@tsujan tsujan added downstream and removed workaround needed labels Feb 12, 2019

@omni6

This comment has been minimized.

Copy link
Contributor Author

omni6 commented Feb 12, 2019

Oh my... need to review some pkgbuilds now ;)

Tested and build is fine now, but added a line to remove the /usr/share/kde4 directory because i think it is not needed anymore. Maybe you can remove it in source.

Ah, thank you!

@omni6 omni6 closed this Feb 12, 2019

@tsujan

This comment has been minimized.

Copy link
Owner

tsujan commented Feb 12, 2019

added a line to remove the /usr/share/kde4 directory because i think it is not needed anymore.

Right! It's just a relic from very old times. I'll remove it later.

@tsujan

This comment has been minimized.

Copy link
Owner

tsujan commented Feb 12, 2019

Oh, I still have one Qt4 app; so, /usr/share/kde4 may remain for a while.

@omni6

This comment has been minimized.

Copy link
Contributor Author

omni6 commented Feb 12, 2019

backward compatiblity... 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment