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 cmake script to compile as submodule #399

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

maxvgi
Copy link

@maxvgi maxvgi commented Dec 20, 2018

I have found that the PHP-CPP library cannot be compiled with cmake if it is used as git submodule.

The main problems:

CMakeLists.txt has syntax errors

It is not contain all necessary options and has syntax errors in static linking

The placement of header files

Library headers are placed in /include directory, the main header phpcpp.h includes it in the following way:

#include <phpcpp/visibility.h>

Even if I add directory /includes to header search paths, the compiler will wearch header in /includes/phpcpp directory.

That is not problem, if I compile the library with make and install it with make install, headers are placed in the system directories properly. But this becomes a problem if I do not want to install the library. Creating symlinks is the ugly way.

@yaroslavche
Copy link

Hello, @EmielBruijntjes !
First of all - thank you for your great library. It's very useful.
We faced one small (not critical) issue with it - we can't add PHP-CPP as submodule and must install library separately.
I'll be very appreciate if you had some time to review this PR and tell your opinion about that.

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.

2 participants