Permalink
Browse files

Don't install mapserver target twice.

The mapserver target only needs to be installed when BUILD_DYNAMIC is true.

For convenience the mapserver_static target is assigned to the staticlib component.

This change also includes the ARCHIVE target from #5164.
  • Loading branch information...
sebastic authored and rouault committed Sep 12, 2015
1 parent 9e96077 commit 3c10ad17cbd04998edf779c92f3be04a9bc3b460
Showing with 9 additions and 7 deletions.
  1. +9 −7 CMakeLists.txt
View
@@ -974,17 +974,19 @@ endif(USE_MSSQL2008)
INSTALL(TARGETS sortshp shptree shptreevis msencrypt legend scalebar tile4ms shptreetst shp2img mapserv
RUNTIME DESTINATION ${INSTALL_BIN_DIR} COMPONENT bin
)
INSTALL(TARGETS mapserver
EXPORT mapserverTargets
LIBRARY DESTINATION ${INSTALL_LIB_DIR} COMPONENT shlib
PUBLIC_HEADER DESTINATION ${INSTALL_INCLUDE_DIR}/mapserver COMPONENT dev
)
if(BUILD_STATIC)
INSTALL(TARGETS mapserver_static DESTINATION ${INSTALL_LIB_DIR})
INSTALL(TARGETS mapserver_static
DESTINATION ${INSTALL_LIB_DIR} COMPONENT staticlib
)
endif(BUILD_STATIC)
if(BUILD_DYNAMIC)
INSTALL(TARGETS mapserver DESTINATION ${INSTALL_LIB_DIR})
INSTALL(TARGETS mapserver
EXPORT mapserverTargets
ARCHIVE DESTINATION ${INSTALL_LIB_DIR} COMPONENT shlib
LIBRARY DESTINATION ${INSTALL_LIB_DIR} COMPONENT shlib
PUBLIC_HEADER DESTINATION ${INSTALL_INCLUDE_DIR}/mapserver COMPONENT dev
)
endif(BUILD_DYNAMIC)
# Add all targets to the build-tree export set

0 comments on commit 3c10ad1

Please sign in to comment.