Refactor cmake scripts, reducing the amount of find_package(Qt4)

c++11
scrawl 10 years ago
parent d03880fbf0
commit fc5176dc38

@ -151,6 +151,8 @@ endif()
# Dependencies
find_package(Qt4 REQUIRED COMPONENTS QtCore QtGui QtNetwork)
# Fix for not visible pthreads functions for linker with glibc 2.15
if (UNIX AND NOT APPLE)
find_package (Threads)

@ -57,7 +57,6 @@ set(LAUNCHER_UI
source_group(launcher FILES ${LAUNCHER} ${LAUNCHER_HEADER})
find_package(Qt4 REQUIRED)
set(QT_USE_QTGUI 1)
# Set some platform specific settings
@ -92,7 +91,8 @@ target_link_libraries(openmw-launcher
${OGRE_LIBRARIES}
${OGRE_STATIC_PLUGINS}
${SDL2_LIBRARY_ONLY}
${QT_LIBRARIES}
${QT_QTGUI_LIBRARY}
${QT_QTCORE_LIBRARY}
components
)

@ -160,7 +160,6 @@ endif(WIN32)
find_package(Boost REQUIRED COMPONENTS ${BOOST_COMPONENTS})
find_package(Qt4 COMPONENTS QtCore QtGui QtNetwork REQUIRED)
include(${QT_USE_FILE})
qt4_wrap_ui(OPENCS_UI_HDR ${OPENCS_UI})
@ -208,7 +207,9 @@ target_link_libraries(openmw-cs
${SHINY_LIBRARIES}
${Boost_LIBRARIES}
${BULLET_LIBRARIES}
${QT_LIBRARIES}
${QT_QTGUI_LIBRARY}
${QT_QTCORE_LIBRARY}
${QT_QTNETWORK_LIBRARY}
components
)

@ -81,7 +81,6 @@ endif (OPENMW_USE_UNSHIELD)
source_group(wizard FILES ${WIZARD} ${WIZARD_HEADER})
find_package(Qt4 REQUIRED)
set(QT_USE_QTGUI 1)
# Set some platform specific settings
@ -113,7 +112,8 @@ add_executable(openmw-wizard
target_link_libraries(openmw-wizard
${Boost_LIBRARIES}
${QT_LIBRARIES}
${QT_QTGUI_LIBRARY}
${QT_QTCORE_LIBRARY}
components
)

@ -126,11 +126,6 @@ add_component_dir (version
set (ESM_UI ${CMAKE_SOURCE_DIR}/files/ui/contentselector.ui
)
find_package(Qt4 COMPONENTS QtCore QtGui)
if(MINGW)
find_package(Bullet REQUIRED COMPONENTS Collision)
endif()
if(QT_QTGUI_LIBRARY AND QT_QTCORE_LIBRARY)
add_component_qt_dir (contentselector
model/modelitem model/esmfile
@ -167,16 +162,15 @@ target_link_libraries(components
${Boost_LIBRARIES}
${OGRE_LIBRARIES}
${OENGINE_LIBRARY}
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${BULLET_LIBRARIES}
)
if (GIT_CHECKOUT)
add_dependencies (components git-version)
endif (GIT_CHECKOUT)
if(MINGW)
target_link_libraries(components ${QT_LIBRARIES} ${BULLET_LIBRARIES})
endif()
if (WIN32)
target_link_libraries(components shlwapi)
endif()

Loading…
Cancel
Save