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

Build fails on branch-7-0 with -DLINK_STATIC_LIBMAPSERVER=1 #5170

Closed
dmorissette opened this issue Sep 21, 2015 · 5 comments
Closed

Build fails on branch-7-0 with -DLINK_STATIC_LIBMAPSERVER=1 #5170

dmorissette opened this issue Sep 21, 2015 · 5 comments
Milestone

Comments

@dmorissette
Copy link
Contributor

@dmorissette dmorissette commented Sep 21, 2015

The changes in #5119 broke the build for branch-7-0 with -DLINK_STATIC_LIBMAPSERVER=1. We get the following error:

CMake Error at CMakeLists.txt:873 (set_target_properties):
  set_target_properties Can not find target to add properties to: mapserver

I was able to patch locally by adding a bunch of if (BUILD_DYNAMIC) and if(BUILD_STATIC) around the mapserver target calls to add the corresponding mapserver_static target calls, but that is probably not the right solution (I am a CMake illiterate, sorry).

I will let @sebastic test -DLINK_STATIC_LIBMAPSERVER=1 and provide a proper fix.

@sebastic
Copy link
Contributor

@sebastic sebastic commented Sep 21, 2015

On 2015-09-21 14:52, Daniel Morissette wrote:

CMake Error at CMakeLists.txt:873 (set_target_properties):
  set_target_properties Can not find target to add properties to: 
mapserver

Does this issue still occur with the changes in the following commit?

3c10ad1

@dmorissette
Copy link
Contributor Author

@dmorissette dmorissette commented Sep 21, 2015

Yes, same problem. I was testing with a branch-7-0 checked out a few minutes ago.

sebastic added a commit to sebastic/mapserver that referenced this issue Sep 21, 2015
The CMake exports are only relevant for the dynamically linked libmapserver.
@sebastic
Copy link
Contributor

@sebastic sebastic commented Sep 21, 2015

I was able to patch locally by adding a bunch of if (BUILD_DYNAMIC) and if(BUILD_STATIC) around the mapserver target calls to add the corresponding mapserver_static target calls, but that is probably not the right solution (I am a CMake illiterate, sorry).

Since the CMake exports only make sense for the dynamically linked libmapserver using BUILD_{DYNAMIC,STATIC} seems appropriate. I only need two additional if statements though, see #5171.

@dmorissette
Copy link
Contributor Author

@dmorissette dmorissette commented Sep 23, 2015

Pull request #5171 solves my build problem. Note that I did not test the install steps, just the build steps, since my test environment is not setup to 'make install'.

@tbonfort
Copy link
Member

@tbonfort tbonfort commented Jan 26, 2016

erroneously closed with #5137

@tbonfort tbonfort reopened this Jan 26, 2016
@tbonfort tbonfort closed this in d26278d Jan 26, 2016
@tbonfort tbonfort added this to the 7.0.1 milestone Feb 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.