|
|
@ -38,6 +38,21 @@ MACRO(PARSE_VERSION_OTHER FILENAME)
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|
ENDMACRO()
|
|
|
|
ENDMACRO()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# macro to define FIND_PACKAGE options with a different package name
|
|
|
|
|
|
|
|
MACRO(FIX_PACKAGE_OPTIONS OLDNAME NEWNAME)
|
|
|
|
|
|
|
|
# append other options if needed
|
|
|
|
|
|
|
|
SET(_OPTIONS COMPONENTS REQUIRED QUIETLY)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# process each options
|
|
|
|
|
|
|
|
FOREACH(_OPTION ${_OPTIONS})
|
|
|
|
|
|
|
|
SET(OLD_OPTION ${OLDNAME}_FIND_${_OPTION})
|
|
|
|
|
|
|
|
IF(DEFINED )
|
|
|
|
|
|
|
|
SET(NEW_OPTION ${NEWNAME}_FIND_${_OPTION})
|
|
|
|
|
|
|
|
SET(${NEW_OPTION} ${OLD_OPTION})
|
|
|
|
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
ENDFOREACH()
|
|
|
|
|
|
|
|
ENDMACRO()
|
|
|
|
|
|
|
|
|
|
|
|
MACRO(FIND_PACKAGE_HELPER NAME INCLUDE)
|
|
|
|
MACRO(FIND_PACKAGE_HELPER NAME INCLUDE)
|
|
|
|
# Looks for a directory containing NAME.
|
|
|
|
# Looks for a directory containing NAME.
|
|
|
|
#
|
|
|
|
#
|
|
|
@ -692,11 +707,11 @@ MACRO(ADD_QT_LIBRARY _NAME)
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|
SET(_LIB "${QT_LIBRARY_DIR}/${_PREFIX}${_NAME}.${_EXT}")
|
|
|
|
SET(_LIB "${QT_LIBRARY_DIR}/${_PREFIX}${_NAME}.${_EXT}")
|
|
|
|
IF(EXISTS ${_LIB})
|
|
|
|
IF(EXISTS ${_LIB})
|
|
|
|
SET(QT_LIBRARIES ${QT_LIBRARIES} optimized ${_LIB})
|
|
|
|
LIST(APPEND QT_LIBRARIES optimized ${_LIB})
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|
SET(_LIB "${QT_LIBRARY_DIR}/${_PREFIX}${_NAME}d.${_EXT}")
|
|
|
|
SET(_LIB "${QT_LIBRARY_DIR}/${_PREFIX}${_NAME}d.${_EXT}")
|
|
|
|
IF(EXISTS ${_LIB})
|
|
|
|
IF(EXISTS ${_LIB})
|
|
|
|
SET(QT_LIBRARIES ${QT_LIBRARIES} debug ${_LIB})
|
|
|
|
LIST(APPEND QT_LIBRARIES debug ${_LIB})
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|
ENDMACRO()
|
|
|
|
ENDMACRO()
|
|
|
|
|
|
|
|
|
|
|
@ -710,11 +725,11 @@ MACRO(ADD_QT_PLUGIN _TYPE _NAME)
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|
SET(_LIB "${QT_PLUGINS_DIR}/${_TYPE}/${_PREFIX}${_NAME}.${_EXT}")
|
|
|
|
SET(_LIB "${QT_PLUGINS_DIR}/${_TYPE}/${_PREFIX}${_NAME}.${_EXT}")
|
|
|
|
IF(EXISTS ${_LIB})
|
|
|
|
IF(EXISTS ${_LIB})
|
|
|
|
SET(QT_LIBRARIES ${QT_LIBRARIES} optimized ${_LIB})
|
|
|
|
LIST(APPEND QT_LIBRARIES optimized ${_LIB})
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|
SET(_LIB "${QT_PLUGINS_DIR}/${_TYPE}/${_PREFIX}${_NAME}d.${_EXT}")
|
|
|
|
SET(_LIB "${QT_PLUGINS_DIR}/${_TYPE}/${_PREFIX}${_NAME}d.${_EXT}")
|
|
|
|
IF(EXISTS ${_LIB})
|
|
|
|
IF(EXISTS ${_LIB})
|
|
|
|
SET(QT_LIBRARIES ${QT_LIBRARIES} debug ${_LIB})
|
|
|
|
LIST(APPEND QT_LIBRARIES debug ${_LIB})
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|
ENDMACRO()
|
|
|
|
ENDMACRO()
|
|
|
|
|
|
|
|
|
|
|
@ -789,12 +804,12 @@ MACRO(FIND_QT5)
|
|
|
|
SET(QT_LIBRARIES Qt5::Widgets)
|
|
|
|
SET(QT_LIBRARIES Qt5::Widgets)
|
|
|
|
|
|
|
|
|
|
|
|
# Gui
|
|
|
|
# Gui
|
|
|
|
SET(QT_LIBRARIES ${QT_LIBRARIES} Qt5::Gui Qt5::OpenGL)
|
|
|
|
LIST(APPEND QT_LIBRARIES Qt5::Gui Qt5::OpenGL)
|
|
|
|
|
|
|
|
|
|
|
|
ADD_QT_LIBRARY(PrintSupport)
|
|
|
|
ADD_QT_LIBRARY(PrintSupport)
|
|
|
|
|
|
|
|
|
|
|
|
IF(WIN32)
|
|
|
|
IF(WIN32)
|
|
|
|
SET(QT_LIBRARIES ${QT_LIBRARIES}
|
|
|
|
LIST(APPEND QT_LIBRARIES
|
|
|
|
${WINSDK_LIBRARY_DIR}/Imm32.lib
|
|
|
|
${WINSDK_LIBRARY_DIR}/Imm32.lib
|
|
|
|
${WINSDK_LIBRARY_DIR}/OpenGL32.lib
|
|
|
|
${WINSDK_LIBRARY_DIR}/OpenGL32.lib
|
|
|
|
${WINSDK_LIBRARY_DIR}/WinMM.Lib)
|
|
|
|
${WINSDK_LIBRARY_DIR}/WinMM.Lib)
|
|
|
@ -812,7 +827,7 @@ MACRO(FIND_QT5)
|
|
|
|
FIND_LIBRARY(SYSTEMCONFIGURATION_FRAMEWORK SystemConfiguration)
|
|
|
|
FIND_LIBRARY(SYSTEMCONFIGURATION_FRAMEWORK SystemConfiguration)
|
|
|
|
FIND_LIBRARY(OPENGL_FRAMEWORK NAMES OpenGL)
|
|
|
|
FIND_LIBRARY(OPENGL_FRAMEWORK NAMES OpenGL)
|
|
|
|
|
|
|
|
|
|
|
|
SET(QT_LIBRARIES ${QT_LIBRARIES}
|
|
|
|
LIST(APPEND QT_LIBRARIES
|
|
|
|
${CUPS_LIBRARY}
|
|
|
|
${CUPS_LIBRARY}
|
|
|
|
${COCOA_FRAMEWORK}
|
|
|
|
${COCOA_FRAMEWORK}
|
|
|
|
${SYSTEMCONFIGURATION_FRAMEWORK}
|
|
|
|
${SYSTEMCONFIGURATION_FRAMEWORK}
|
|
|
@ -839,7 +854,7 @@ MACRO(FIND_QT5)
|
|
|
|
ADD_QT_LIBRARY(DBus)
|
|
|
|
ADD_QT_LIBRARY(DBus)
|
|
|
|
|
|
|
|
|
|
|
|
IF(EXISTS "${QT_LIBRARY_DIR}/libxcb-static.a")
|
|
|
|
IF(EXISTS "${QT_LIBRARY_DIR}/libxcb-static.a")
|
|
|
|
SET(QT_LIBRARIES ${QT_LIBRARIES} "${QT_LIBRARY_DIR}/libxcb-static.a")
|
|
|
|
LIST(APPEND QT_LIBRARIES "${QT_LIBRARY_DIR}/libxcb-static.a")
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
|
|
|
|
# always link these in dynamic, API never changes
|
|
|
|
# always link these in dynamic, API never changes
|
|
|
@ -871,14 +886,14 @@ MACRO(FIND_QT5)
|
|
|
|
SET(HB_LIB "${QT_LIBRARY_DIR}/qtharfbuzzng.lib")
|
|
|
|
SET(HB_LIB "${QT_LIBRARY_DIR}/qtharfbuzzng.lib")
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|
IF(EXISTS ${HB_LIB})
|
|
|
|
IF(EXISTS ${HB_LIB})
|
|
|
|
SET(QT_LIBRARIES ${QT_LIBRARIES} ${HB_LIB})
|
|
|
|
LIST(APPEND QT_LIBRARIES ${HB_LIB})
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
|
|
|
|
# freetype is needed since Qt 5.5
|
|
|
|
# freetype is needed since Qt 5.5
|
|
|
|
FIND_PACKAGE(Freetype)
|
|
|
|
FIND_PACKAGE(Freetype)
|
|
|
|
|
|
|
|
|
|
|
|
IF(FREETYPE_FOUND)
|
|
|
|
IF(FREETYPE_FOUND)
|
|
|
|
SET(QT_LIBRARIES ${QT_LIBRARIES} ${FREETYPE_LIBRARIES})
|
|
|
|
LIST(APPEND QT_LIBRARIES ${FREETYPE_LIBRARIES})
|
|
|
|
ELSE()
|
|
|
|
ELSE()
|
|
|
|
IF(UNIX)
|
|
|
|
IF(UNIX)
|
|
|
|
SET(FREETYPE_LIB "${QT_LIBRARY_DIR}/libqtfreetype.a")
|
|
|
|
SET(FREETYPE_LIB "${QT_LIBRARY_DIR}/libqtfreetype.a")
|
|
|
@ -886,27 +901,27 @@ MACRO(FIND_QT5)
|
|
|
|
SET(FREETYPE_LIB "${QT_LIBRARY_DIR}/qtfreetype.lib")
|
|
|
|
SET(FREETYPE_LIB "${QT_LIBRARY_DIR}/qtfreetype.lib")
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|
IF(EXISTS ${FREETYPE_LIB})
|
|
|
|
IF(EXISTS ${FREETYPE_LIB})
|
|
|
|
SET(QT_LIBRARIES ${QT_LIBRARIES} ${FREETYPE_LIB})
|
|
|
|
LIST(APPEND QT_LIBRARIES ${FREETYPE_LIB})
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
|
|
|
|
ADD_QT_PLUGIN(accessible qtaccessiblewidgets)
|
|
|
|
ADD_QT_PLUGIN(accessible qtaccessiblewidgets)
|
|
|
|
|
|
|
|
|
|
|
|
SET(QT_LIBRARIES ${QT_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARY})
|
|
|
|
LIST(APPEND QT_LIBRARIES ${PNG_LIBRARIES} ${JPEG_LIBRARY})
|
|
|
|
|
|
|
|
|
|
|
|
# Network
|
|
|
|
# Network
|
|
|
|
SET(QT_LIBRARIES ${QT_LIBRARIES} Qt5::Network Qt5::Xml)
|
|
|
|
LIST(APPEND QT_LIBRARIES Qt5::Network Qt5::Xml)
|
|
|
|
SET(QT_LIBRARIES ${QT_LIBRARIES} ${OPENSSL_LIBRARIES} ${ZLIB_LIBRARIES})
|
|
|
|
LIST(APPEND QT_LIBRARIES ${OPENSSL_LIBRARIES} ${ZLIB_LIBRARIES})
|
|
|
|
|
|
|
|
|
|
|
|
IF(WIN32)
|
|
|
|
IF(WIN32)
|
|
|
|
SET(QT_LIBRARIES ${QT_LIBRARIES}
|
|
|
|
LIST(APPEND QT_LIBRARIES
|
|
|
|
${WINSDK_LIBRARY_DIR}/Crypt32.lib
|
|
|
|
${WINSDK_LIBRARY_DIR}/Crypt32.lib
|
|
|
|
${WINSDK_LIBRARY_DIR}/WS2_32.Lib
|
|
|
|
${WINSDK_LIBRARY_DIR}/WS2_32.Lib
|
|
|
|
${WINSDK_LIBRARY_DIR}/IPHlpApi.Lib)
|
|
|
|
${WINSDK_LIBRARY_DIR}/IPHlpApi.Lib)
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
|
|
|
|
# Core
|
|
|
|
# Core
|
|
|
|
SET(QT_LIBRARIES ${QT_LIBRARIES} Qt5::Core)
|
|
|
|
LIST(APPEND QT_LIBRARIES Qt5::Core)
|
|
|
|
|
|
|
|
|
|
|
|
# pcre is needed since Qt 5.5
|
|
|
|
# pcre is needed since Qt 5.5
|
|
|
|
IF(UNIX)
|
|
|
|
IF(UNIX)
|
|
|
@ -918,7 +933,7 @@ MACRO(FIND_QT5)
|
|
|
|
SET(PCRE_LIB "${QT_LIBRARY_DIR}/qtpcre.lib")
|
|
|
|
SET(PCRE_LIB "${QT_LIBRARY_DIR}/qtpcre.lib")
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|
IF(EXISTS ${PCRE_LIB})
|
|
|
|
IF(EXISTS ${PCRE_LIB})
|
|
|
|
SET(QT_LIBRARIES ${QT_LIBRARIES} ${PCRE_LIB})
|
|
|
|
LIST(APPEND QT_LIBRARIES ${PCRE_LIB})
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
|
|
|
|
IF(APPLE)
|
|
|
|
IF(APPLE)
|
|
|
@ -926,13 +941,14 @@ MACRO(FIND_QT5)
|
|
|
|
|
|
|
|
|
|
|
|
FIND_LIBRARY(SECURITY_FRAMEWORK Security)
|
|
|
|
FIND_LIBRARY(SECURITY_FRAMEWORK Security)
|
|
|
|
|
|
|
|
|
|
|
|
SET(QT_LIBRARIES ${QT_LIBRARIES}
|
|
|
|
LIST(APPEND QT_LIBRARIES
|
|
|
|
${PCRE_LIBRARY}
|
|
|
|
${PCRE_LIBRARY}
|
|
|
|
${FOUNDATION_FRAMEWORK}
|
|
|
|
${FOUNDATION_FRAMEWORK}
|
|
|
|
${CARBON_FRAMEWORK}
|
|
|
|
${CARBON_FRAMEWORK}
|
|
|
|
${SECURITY_FRAMEWORK})
|
|
|
|
${SECURITY_FRAMEWORK})
|
|
|
|
ELSEIF(UNIX)
|
|
|
|
ELSEIF(UNIX)
|
|
|
|
SET(QT_LIBRARIES ${QT_LIBRARIES} ${ZLIB_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} -ldl -lrt)
|
|
|
|
FIND_PACKAGE(Threads)
|
|
|
|
|
|
|
|
LIST(APPEND QT_LIBRARIES ${ZLIB_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS} -lrt)
|
|
|
|
ENDIF()
|
|
|
|
ENDIF()
|
|
|
|
ELSE()
|
|
|
|
ELSE()
|
|
|
|
SET(QT_LIBRARIES Qt5::Widgets Qt5::Network Qt5::Xml Qt5::Gui Qt5::OpenGL Qt5::Core)
|
|
|
|
SET(QT_LIBRARIES Qt5::Widgets Qt5::Network Qt5::Xml Qt5::Gui Qt5::OpenGL Qt5::Core)
|
|
|
|