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

Fix installation on Linux/Mac machines #101

Closed
wants to merge 4 commits into from
Closed

Fix installation on Linux/Mac machines #101

wants to merge 4 commits into from

Conversation

Warchant
Copy link

@Warchant Warchant commented Jan 20, 2018

  • Resolve CMP0042 issue with new CMake, OSX
  • Make CMAKE_DEBUG_POSTFIX rewritable from terminal (e.g.: cmake .. -DCMAKE_DEBUG_POSTFIX=hello)
  • Add manually generated detail/base/version.h: if you install this project and do not include it via generated rttr-config.cmake, then this file is not generated and compilation fails
  • Use GNUInstallDirs package for install paths on OSX and Linux. Now you can write
    cmake -DCMAKE_INSTALL_PREFIX=/usr/local ${src}
    make install
    and it will install libraries into /usr/local/lib, binaries in /usr/local/bin, cmake in /usr/local/share/rttr/cmake
  • Fix issue with permissions: typically on OSX or Linux you want to install libraries in /usr/local/lib, binaries in /usr/local/bin, etc. To write in these directories you need root permissions. In CMake, during install, it installed OWNER_READ permissions on headers, it resulted in permission error for other users - they were unable to read headers.
  • Replace legacy libstdc++ with libc++

Now master can be built and installed in the system without any problems.

@acki-m
Copy link
Contributor

acki-m commented Jan 20, 2018

Add manually generated detail/base/version.h: if you install this project and do not include it via generated rttr-config.cmake, then this file is not generated and compilation fails

This is not true. When you generate the cmake project, then this file will be generated from cmake.
When you install RTTR , it will be installed too. It's independent from rttr-config.cmake.

I have to check first how your changes affect the VS-Windows build.

@coveralls
Copy link

coveralls commented Jan 21, 2018

Coverage Status

Coverage remained the same at 91.566% when pulling a7c2fb3 on Warchant:master into 47d576c on rttrorg:master.

@acki-m
Copy link
Contributor

acki-m commented Jan 21, 2018

I compiled your PR with MSVC, it fails because of this reason:

7>-- Install configuration: "Debug"
7>CMake Error at cmake_install.cmake:31 (file):
7>  file cannot create directory: C:/Program Files/rttr/share/rttr/cmake.
7>  Maybe need administrative privileges.

Can you restore the old behavior, so that by default, when not custom install directory was provided, it will be installed in the build directory?

@gabyx
Copy link
Contributor

gabyx commented Jan 21, 2018

I am working an a fix for this!

@gabyx
Copy link
Contributor

gabyx commented Jan 21, 2018

See PR #103 : I merged this PR, and restored some good behavior which was over written.
The version.h, is written on OS X and I did not merge this add. file

@Warchant
Copy link
Author

Warchant commented Jan 22, 2018

Sorry for the delay with answer. Since @gabyx already fixed issues, I am closing this PR and will continue work in #103

@Warchant Warchant closed this Jan 22, 2018
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.

4 participants