Cleanup the static Qt config

This commit is contained in:
Hannah von Reth 2017-01-20 10:15:49 +01:00
parent 2bf3e887ee
commit 8872ac5eed
2 changed files with 44 additions and 42 deletions

View File

@ -27,6 +27,8 @@ include(ECMPackageConfigHelpers)
include(ECMPoQmTools) include(ECMPoQmTools)
include(ECMSetupVersion) include(ECMSetupVersion)
include(QtStatic)
set(SNORE_VERSION_MAJOR 0) set(SNORE_VERSION_MAJOR 0)
set(SNORE_VERSION_MINOR 7) set(SNORE_VERSION_MINOR 7)
@ -62,48 +64,6 @@ set(SNORE_PLUGIN_INSTALL_PATH LIBRARY DESTINATION ${LIBSNORE_PLUGIN_PATH})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
if (SNORE_STATIC_QT)
if (WIN32)
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
set(d "d")
else()
set(d "")
endif()
if(MSVC)
set(SUFFIX "lib")
foreach(_bt DEBUG RELEASE RELWITHDEBINFO)
string(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_${_bt} ${CMAKE_CXX_FLAGS_${_bt}})
endforeach(_bt DEBUG RELEASE RELWITHDEBINFO)
else()
set(SUFFIX "a")
endif()
link_libraries(
"${_qt5Core_install_prefix}/lib/qtharfbuzzng${d}.${SUFFIX}"
"${_qt5Core_install_prefix}/lib/qtpcre${d}.${SUFFIX}"
#"${_qt5Core_install_prefix}/lib/qtpng${d}.${SUFFIX}"
"${_qt5Core_install_prefix}/lib/qtfreetype${d}.${SUFFIX}"
"${_qt5Core_install_prefix}/lib/Qt5PlatformSupport${d}.${SUFFIX}"
"${_qt5Core_install_prefix}/plugins/platforms/qwindows${d}.${SUFFIX}"
"Ws2_32"
"Imm32"
"Winmm"
"Iphlpapi"
"opengl32"
)
if (Qt5Quick_FOUND)
link_libraries(
"${_qt5Core_install_prefix}/qml/QtQuick.2/qtquick2plugin${d}.${SUFFIX}"
"${_qt5Core_install_prefix}/qml/QtQuick/Window.2/windowplugin${d}.${SUFFIX}"
)
endif()
endif()
endif()
add_subdirectory(data) add_subdirectory(data)
add_subdirectory(src) add_subdirectory(src)

View File

@ -0,0 +1,42 @@
if (SNORE_STATIC_QT)
if (WIN32)
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
set(d "d")
else()
set(d "")
endif()
if(MSVC)
set(SUFFIX "lib")
foreach(_bt DEBUG RELEASE RELWITHDEBINFO)
string(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_${_bt} ${CMAKE_CXX_FLAGS_${_bt}})
endforeach(_bt DEBUG RELEASE RELWITHDEBINFO)
else()
set(SUFFIX "a")
endif()
link_libraries(
"${_qt5Core_install_prefix}/lib/qtharfbuzzng${d}.${SUFFIX}"
"${_qt5Core_install_prefix}/lib/qtpcre${d}.${SUFFIX}"
#"${_qt5Core_install_prefix}/lib/qtpng${d}.${SUFFIX}"
"${_qt5Core_install_prefix}/lib/qtfreetype${d}.${SUFFIX}"
"${_qt5Core_install_prefix}/lib/Qt5PlatformSupport${d}.${SUFFIX}"
"${_qt5Core_install_prefix}/plugins/platforms/qwindows${d}.${SUFFIX}"
"${_qt5Core_install_prefix}/plugins/platforms/qwindows${d}.${SUFFIX}"
"${_qt5Core_install_prefix}/plugins/mediaservice/dsengine${d}.${SUFFIX}"
"Ws2_32"
"Imm32"
"Winmm"
"Iphlpapi"
"opengl32"
)
if (Qt5Quick_FOUND)
link_libraries(
"${_qt5Core_install_prefix}/qml/QtQuick.2/qtquick2plugin${d}.${SUFFIX}"
"${_qt5Core_install_prefix}/qml/QtQuick/Window.2/windowplugin${d}.${SUFFIX}"
)
endif()
endif()
endif()