Skip to content
Permalink
Browse files

Merge pull request #8038 from qgis/3nids-patch-3

fix missing include of Qt libs in src/test/qgstest.h
  • Loading branch information
3nids committed Sep 27, 2018
2 parents 2275853 + 97c5ed0 commit f6f3174e1e367d9c1d34301c6ad70414f881b305
Showing with 51 additions and 45 deletions.
  1. +46 −44 mac/cmake/1qt.cmake.in
  2. +4 −0 src/test/CMakeLists.txt
  3. +1 −1 tests/src/native/CMakeLists.txt
@@ -132,50 +132,52 @@ ENDIF (QWT_ISLIB)

# QwtPolar

IF (@WITH_QWTPOLAR@ AND NOT @WITH_INTERNAL_QWTPOLAR@)
STRING (REGEX MATCH "\\.dylib$" ISLIB "@QWTPOLAR_LIBRARY@")
STRING (REGEX MATCH "qwtpolar.framework" ISFW "@QWTPOLAR_LIBRARY@")
IF (ISLIB)
# shared libraries
MESSAGE (STATUS "Copying QwtPolar and updating library paths...")
IF (NOT EXISTS "${QLIBDIR}/libqwtpolar.dylib")
EXECUTE_PROCESS (COMMAND ditto ${QARCHS} "@QWT_LIBRARY@" "${QLIBDIR}/libqwtpolar.dylib")
ENDIF ()
GET_INSTALL_NAME ("@QWTPOLAR_LIBRARY@" "libqwtpolar" QWTP_CHG)
IF (QWTP_CHG)
UPDATEQGISPATHS (${QWTP_CHG} libqwtpolar.dylib)
ENDIF (QWTP_CHG)
# update qwt lib in qwtpolar
IF (QWT_CHG)
IF (QWT_ISLIB)
SET (QWT_CHG_TO "${ATLOADER}/libqwt.dylib")
ElSE ()
SET (QWT_CHG_TO "${ATLOADER}/${QGIS_LIB_SUBDIR_REV}/${QGIS_FW_SUBDIR}/qwt.framework/qwt")
ENDIF ()
INSTALLNAMETOOL_CHANGE ("${QWT_CHG}" "${QWT_CHG_TO}" "${QLIBDIR}/libqwtpolar.dylib")
ENDIF (QWT_CHG)
ELSEIF (ISFW AND EXISTS "@QWTPOLAR_LIBRARY@")
# framework
MESSAGE (STATUS "Copying QwtPolar framework and updating library paths...")
STRING(REGEX REPLACE "/qwtpolar.framework.*" "" QWTP_PARENT "@QWTPOLAR_LIBRARY@")
IF (NOT IS_DIRECTORY "${QFWDIR}/qwtpolar.framework")
COPY_FRAMEWORK("${QWTP_PARENT}" "qwtpolar" "${QFWDIR}")
ENDIF ()
GET_INSTALL_NAME ("${QWTP_PARENT}/qwtpolar.framework/qwtpolar" "qwtpolar.framework" QWTP_CHG)
IF (QWTP_CHG)
UPDATEQGISPATHS (${QWTP_CHG} qwtpolar)
ENDIF (QWTP_CHG)
# update qwt lib in qwtpolar
IF (QWT_CHG)
IF (QWT_ISLIB)
SET (QWT_CHG_TO "${ATLOADER}/../../../${QGIS_FW_SUBDIR_REV}/${QGIS_LIB_SUBDIR}/libqwt.dylib")
ElSE ()
SET (QWT_CHG_TO "${ATLOADER}/../../../qwt.framework/qwt")
ENDIF ()
INSTALLNAMETOOL_CHANGE ("${QWT_CHG}" "${QWT_CHG_TO}" "${QFWDIR}/qwtpolar.framework/qwtpolar")
ENDIF (QWT_CHG)
ENDIF (ISLIB)
ENDIF (@WITH_QWTPOLAR@ AND NOT @WITH_INTERNAL_QWTPOLAR@)
IF (@WITH_DESKTOP@)
IF (@WITH_QWTPOLAR@ AND NOT @WITH_INTERNAL_QWTPOLAR@)
STRING (REGEX MATCH "\\.dylib$" ISLIB "@QWTPOLAR_LIBRARY@")
STRING (REGEX MATCH "qwtpolar.framework" ISFW "@QWTPOLAR_LIBRARY@")
IF (ISLIB)
# shared libraries
MESSAGE (STATUS "Copying QwtPolar and updating library paths...")
IF (NOT EXISTS "${QLIBDIR}/libqwtpolar.dylib")
EXECUTE_PROCESS (COMMAND ditto ${QARCHS} "@QWT_LIBRARY@" "${QLIBDIR}/libqwtpolar.dylib")
ENDIF ()
GET_INSTALL_NAME ("@QWTPOLAR_LIBRARY@" "libqwtpolar" QWTP_CHG)
IF (QWTP_CHG)
UPDATEQGISPATHS (${QWTP_CHG} libqwtpolar.dylib)
ENDIF (QWTP_CHG)
# update qwt lib in qwtpolar
IF (QWT_CHG)
IF (QWT_ISLIB)
SET (QWT_CHG_TO "${ATLOADER}/libqwt.dylib")
ElSE ()
SET (QWT_CHG_TO "${ATLOADER}/${QGIS_LIB_SUBDIR_REV}/${QGIS_FW_SUBDIR}/qwt.framework/qwt")
ENDIF ()
INSTALLNAMETOOL_CHANGE ("${QWT_CHG}" "${QWT_CHG_TO}" "${QLIBDIR}/libqwtpolar.dylib")
ENDIF (QWT_CHG)
ELSEIF (ISFW AND EXISTS "@QWTPOLAR_LIBRARY@")
# framework
MESSAGE (STATUS "Copying QwtPolar framework and updating library paths...")
STRING(REGEX REPLACE "/qwtpolar.framework.*" "" QWTP_PARENT "@QWTPOLAR_LIBRARY@")
IF (NOT IS_DIRECTORY "${QFWDIR}/qwtpolar.framework")
COPY_FRAMEWORK("${QWTP_PARENT}" "qwtpolar" "${QFWDIR}")
ENDIF ()
GET_INSTALL_NAME ("${QWTP_PARENT}/qwtpolar.framework/qwtpolar" "qwtpolar.framework" QWTP_CHG)
IF (QWTP_CHG)
UPDATEQGISPATHS (${QWTP_CHG} qwtpolar)
ENDIF (QWTP_CHG)
# update qwt lib in qwtpolar
IF (QWT_CHG)
IF (QWT_ISLIB)
SET (QWT_CHG_TO "${ATLOADER}/../../../${QGIS_FW_SUBDIR_REV}/${QGIS_LIB_SUBDIR}/libqwt.dylib")
ElSE ()
SET (QWT_CHG_TO "${ATLOADER}/../../../qwt.framework/qwt")
ENDIF ()
INSTALLNAMETOOL_CHANGE ("${QWT_CHG}" "${QWT_CHG_TO}" "${QFWDIR}/qwtpolar.framework/qwtpolar")
ENDIF (QWT_CHG)
ENDIF (ISLIB)
ENDIF (@WITH_QWTPOLAR@ AND NOT @WITH_INTERNAL_QWTPOLAR@)
ENDIF (@WITH_DESKTOP@)

# QCA

@@ -1,5 +1,9 @@
# for installing headers

INCLUDE_DIRECTORIES(SYSTEM
${QT_INCLUDE_DIR}
)

SET(QGIS_TEST_HDRS
qgstest.h
)
@@ -65,7 +65,7 @@ MACRO (ADD_QGIS_TEST testname testsrc)
TARGET_LINK_LIBRARIES(qgis_${testname}
${Qt5Core_LIBRARIES}
${Qt5Test_LIBRARIES}
qgis_gui
qgis_core
qgis_native
)
ADD_TEST(qgis_${testname} ${CMAKE_CURRENT_BINARY_DIR}/../../../output/bin/qgis_${testname} -maxwarnings 10000)

0 comments on commit f6f3174

Please sign in to comment.
You can’t perform that action at this time.