Skip to content

Commit

Permalink
install app lib and link qgis to it
Browse files Browse the repository at this point in the history
  • Loading branch information
blazek committed Sep 23, 2015
1 parent 33cddb8 commit 17cb59f
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -505,9 +505,9 @@ ENDIF (POSTGRES_FOUND)

#############
IF (ANDROID)
ADD_LIBRARY(${QGIS_APP_NAME} SHARED main.cpp ${QGIS_APP_SRCS} ${QGIS_APP_MOC_SRCS} ${QGIS_APP_HDRS} ${QGIS_APP_MOC_HDRS} ${IMAGE_RCC_SRCS} ${TEST_RCC_SRCS})
ADD_LIBRARY(${QGIS_APP_NAME} SHARED main.cpp)
ELSE (ANDROID)
ADD_EXECUTABLE(${QGIS_APP_NAME} MACOSX_BUNDLE WIN32 main.cpp ${QGIS_APP_SRCS} ${QGIS_APP_MOC_SRCS} ${IMAGE_RCC_SRCS} ${TEST_RCC_SRCS})
ADD_EXECUTABLE(${QGIS_APP_NAME} MACOSX_BUNDLE WIN32 main.cpp)
ENDIF (ANDROID)

IF (NOT MSVC)
Expand All @@ -519,7 +519,7 @@ ENDIF (NOT MSVC)
ADD_DEFINITIONS("\"-DAPP_EXPORT=${DLLEXPORT}\"")

# shared library used by tests - TODO: use it also for qgis executable?
ADD_LIBRARY(qgis_app SHARED ${QGIS_APP_SRCS} ${QGIS_APP_MOC_SRCS} ${QGIS_APP_HDRS} ${QGIS_APP_MOC_HDRS} ${IMAGE_RCC_SRCS})
ADD_LIBRARY(qgis_app SHARED ${QGIS_APP_SRCS} ${QGIS_APP_MOC_SRCS} ${QGIS_APP_HDRS} ${QGIS_APP_MOC_HDRS} ${IMAGE_RCC_SRCS} ${TEST_RCC_SRCS})

TARGET_LINK_LIBRARIES(qgis_app
${QWT_LIBRARY}
Expand Down Expand Up @@ -552,6 +552,7 @@ TARGET_LINK_LIBRARIES(${QGIS_APP_NAME}
${QT_QTMAIN_LIBRARY}
${QWTPOLAR_LIBRARY}
${GDAL_LIBRARY}
qgis_app
qgis_core
qgis_gui
qgis_analysis
Expand Down Expand Up @@ -589,6 +590,13 @@ IF(MSVC)
INSTALL(FILES qgis.ico DESTINATION ${CMAKE_INSTALL_PREFIX}/icons)
ENDIF(MSVC)

INSTALL(TARGETS qgis_app
RUNTIME DESTINATION ${QGIS_BIN_DIR}
LIBRARY DESTINATION ${QGIS_LIB_DIR}
ARCHIVE DESTINATION ${QGIS_LIB_DIR}
FRAMEWORK DESTINATION ${QGIS_FW_SUBDIR}
PUBLIC_HEADER DESTINATION ${QGIS_INCLUDE_DIR})

INSTALL(TARGETS ${QGIS_APP_NAME}
BUNDLE DESTINATION ${QGIS_INSTALL_PREFIX}
RUNTIME DESTINATION ${QGIS_BIN_DIR}
Expand Down

0 comments on commit 17cb59f

Please sign in to comment.