Skip to content
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

cmake improvements #37

Merged
merged 3 commits into from Sep 15, 2018
Merged

cmake improvements #37

merged 3 commits into from Sep 15, 2018

Conversation

alonbl
Copy link
Contributor

@alonbl alonbl commented Sep 11, 2018

Allow overriding install directories
Do not build MTM unless requested
Allow disable device build

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
@PeterHuewe
Copy link
Owner

Looks good to me - merged

@PeterHuewe PeterHuewe merged commit fbd6c55 into PeterHuewe:master Sep 15, 2018
Copy link
Owner

@PeterHuewe PeterHuewe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Damn, it generates errors:
@alonbl

CMake Error at CMakeLists.txt:20 (install):
install TARGETS given no LIBRARY DESTINATION for shared library target
"tddl".

CMake Error at CMakeLists.txt:21 (install):
install TARGETS given no ARCHIVE DESTINATION for static library target
"tddl_static".

CMake Error at CMakeLists.txt:22 (install):
install FILES given no DESTINATION!

@alonbl
Copy link
Contributor Author

alonbl commented Sep 15, 2018

which version of cmake do you use?

@PeterHuewe
Copy link
Owner

PeterHuewe commented Sep 15, 2018

$ cmake --version
cmake version 3.9.6
on gentoo

cat /etc/gentoo-release
Gentoo Base System release 2.4.1

$ eix cmake
* dev-ros/cmake_modules
     Verfügbare Versionen:   ~0.4.0 ~0.4.1 **9999 {test PYTHON_TARGETS="python2_7"}
     Startseite:             https://wiki.ros.org/cmake_modules https://github.com/ros/cmake_modules
     Beschreibung:           CMake Modules which are not distributed with CMake but are commonly used by ROS packages

[I] dev-util/cmake
     Verfügbare Versionen:   3.9.6 ~3.10.3 ~3.11.4-r1 ~3.12.0 {doc emacs ncurses qt5 server system-jsoncpp test}
     Installierte Versionen: 3.9.6(17:35:49 25.03.2018)(ncurses -doc -emacs -qt5 -server -system-jsoncpp -test)
     Startseite:             https://cmake.org/
     Beschreibung:           Cross platform Make

* dev-util/cmake-fedora
     Verfügbare Versionen:   2.7.1^t
     Startseite:             https://pagure.io/cmake-fedora
     Beschreibung:           Provides cmake helper macros and targets for linux, especially fedora developers

* dev-util/icmake
     Verfügbare Versionen:   ~9.02.07 ~9.02.08
     Startseite:             http://fbb-git.gitlab.io/icmake/ https://gitlab.com/fbb-git/icmake
     Beschreibung:           Hybrid between a make utility and a shell scripting language

* dev-util/ignition-cmake
     Verfügbare Versionen:   ~0.2.0 ~0.4.0 {ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32"}
     Startseite:             https://bitbucket.org/ignitionrobotics/ign-cmake
     Beschreibung:           CMake modules to be used by the Ignition projects.

[I] kde-frameworks/extra-cmake-modules
     Verfügbare Versionen:   (5) 5.46.0(5/5.46) ~5.48.0(5/5.48)
       {doc test}
     Installierte Versionen: 5.46.0(5)(23:28:52 02.08.2018)(-doc -test)
     Startseite:             https://cgit.kde.org/extra-cmake-modules.git
     Beschreibung:           Extra modules and scripts for CMake

* x11-misc/gccmakedep
     Verfügbare Versionen:   1.0.3 ~1.0.3-r1 **9999
     Startseite:             https://www.x.org/wiki/ https://cgit.freedesktop.org/
     Beschreibung:           create dependencies in makefiles using 'gcc -M'

@alonbl
Copy link
Contributor Author

alonbl commented Sep 15, 2018

same as I, what is the output of:

$ cmake -LA .. | grep CMAKE_INSTALL_LIBDIR
CMAKE_INSTALL_LIBDIR:PATH=lib64

@PeterHuewe
Copy link
Owner

/fast/tpm-emulator $ cmake -LA .. | grep CMAKE_INSTALL_LIBDIR
CMake Error: The source directory "/fast" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
$ cd build
/fast/tpm-emulator/build $ cmake -LA .. | grep CMAKE_INSTALL_LIBDIR
CMake Error at CMakeLists.txt:19 (install):
  install TARGETS given no LIBRARY DESTINATION for shared library target
  "tddl".


CMake Error at CMakeLists.txt:20 (install):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "tddl_static".


CMake Error at CMakeLists.txt:21 (install):
  install FILES given no DESTINATION!

@PeterHuewe
Copy link
Owner

sorry, please ignore - I had to delete the cmake cache first.

@alonbl
Copy link
Contributor Author

alonbl commented Sep 15, 2018

I can reproduce this if I remove the following from CMakeLists.txt:

include(GNUInstallDirs)

This is workaround:

cmake -DCMAKE_INSTALL_LIBDIR=lib64 -DCMAKE_INSTALL_BINDIR=bin -DCMAKE_INSTALL_INCLUDEDIR=include ..

Need to understand why it is not included for you, searching.

@alonbl
Copy link
Contributor Author

alonbl commented Sep 15, 2018

oh... everything is ok?

@PeterHuewe
Copy link
Owner

Yes - everything okay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants