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

Superfluous include causes failures if WLC headers aren't installed globally #1115

Merged
merged 1 commit into from
Mar 14, 2017
Merged

Superfluous include causes failures if WLC headers aren't installed globally #1115

merged 1 commit into from
Mar 14, 2017

Conversation

snoack
Copy link
Contributor

@snoack snoack commented Mar 14, 2017

If the WLC headers aren't installed globally (e.g. somewhere in your home directory rather than in /usr/includes), despite -DWLC_INCLUDE_DIRS being passed correctly to cmake, make fails.

Apparently, the CMakeList.txt in some subdirectories are missing WLC_INCLUDE_DIRS in their include_directories() directive.

@ddevault
Copy link
Contributor

None of these subdirectories use WLC...

@snoack
Copy link
Contributor Author

snoack commented Mar 14, 2017

Then why do I get following error, unless I add WLC_INCLUDE_DIRS to swaybg/CMakeList.txt (or install the WLC headers into /usr/includes)?

[ 89%] Building C object swaybg/CMakeFiles/swaybg.dir/main.c.o
In file included from /tmp/sway/swaybg/main.c:14:0:
/tmp/sway/include/util.h:6:21: fatal error: wlc/wlc.h: No such file or directory
 #include <wlc/wlc.h>
                     ^
compilation terminated.
swaybg/CMakeFiles/swaybg.dir/build.make:62: recipe for target 'swaybg/CMakeFiles/swaybg.dir/main.c.o' failed
make[2]: *** [swaybg/CMakeFiles/swaybg.dir/main.c.o] Error 1
CMakeFiles/Makefile2:625: recipe for target 'swaybg/CMakeFiles/swaybg.dir/all' failed
make[1]: *** [swaybg/CMakeFiles/swaybg.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

(It seems that code in these subdirectories includes headers which in return include WLC headers.)

@ddevault
Copy link
Contributor

The actual problem then seems to be that "include/util.h" includes wlc/wlc.h without actually needing it.

@snoack
Copy link
Contributor Author

snoack commented Mar 14, 2017

If that is the case, feel free to remove the redundant includes. That should work as well.

@ddevault
Copy link
Contributor

I'm suggesting your remove them and update your pull request.

@snoack
Copy link
Contributor Author

snoack commented Mar 14, 2017

There you go.

@snoack snoack changed the title Added missing WLC includes Superfluous include causes failures if WLC headers aren't installed globally Mar 14, 2017
@ddevault ddevault merged commit 109f384 into swaywm:master Mar 14, 2017
@ddevault
Copy link
Contributor

Thanks!

@snoack snoack deleted the missing-includes branch March 14, 2017 18:54
ddevault added a commit that referenced this pull request Apr 3, 2017
Superfluous include causes failures if WLC headers aren't installed globally
@ddevault ddevault mentioned this pull request Apr 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants