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

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

Comments

Projects
None yet
3 participants
@dmorissette
Contributor

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

This comment has been minimized.

Show comment
Hide comment
@sebastic

sebastic Sep 21, 2015

Contributor

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

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@dmorissette

dmorissette Sep 21, 2015

Contributor

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

Contributor

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

Don't export mapserver target for static libmapserver. (#5170)
The CMake exports are only relevant for the dynamically linked libmapserver.
@sebastic

This comment has been minimized.

Show comment
Hide comment
@sebastic

sebastic Sep 21, 2015

Contributor

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.

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@dmorissette

dmorissette Sep 23, 2015

Contributor

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'.

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Jan 26, 2016

Member

erroneously closed with #5137

Member

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