forked from mirror/openmw-tes3mp
Refactor cmake scripts, reducing the amount of find_package(Qt4)
This commit is contained in:
parent
d03880fbf0
commit
fc5176dc38
5 changed files with 12 additions and 15 deletions
|
@ -151,6 +151,8 @@ endif()
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
|
|
||||||
|
find_package(Qt4 REQUIRED COMPONENTS QtCore QtGui QtNetwork)
|
||||||
|
|
||||||
# Fix for not visible pthreads functions for linker with glibc 2.15
|
# Fix for not visible pthreads functions for linker with glibc 2.15
|
||||||
if (UNIX AND NOT APPLE)
|
if (UNIX AND NOT APPLE)
|
||||||
find_package (Threads)
|
find_package (Threads)
|
||||||
|
|
|
@ -57,7 +57,6 @@ set(LAUNCHER_UI
|
||||||
|
|
||||||
source_group(launcher FILES ${LAUNCHER} ${LAUNCHER_HEADER})
|
source_group(launcher FILES ${LAUNCHER} ${LAUNCHER_HEADER})
|
||||||
|
|
||||||
find_package(Qt4 REQUIRED)
|
|
||||||
set(QT_USE_QTGUI 1)
|
set(QT_USE_QTGUI 1)
|
||||||
|
|
||||||
# Set some platform specific settings
|
# Set some platform specific settings
|
||||||
|
@ -92,7 +91,8 @@ target_link_libraries(openmw-launcher
|
||||||
${OGRE_LIBRARIES}
|
${OGRE_LIBRARIES}
|
||||||
${OGRE_STATIC_PLUGINS}
|
${OGRE_STATIC_PLUGINS}
|
||||||
${SDL2_LIBRARY_ONLY}
|
${SDL2_LIBRARY_ONLY}
|
||||||
${QT_LIBRARIES}
|
${QT_QTGUI_LIBRARY}
|
||||||
|
${QT_QTCORE_LIBRARY}
|
||||||
components
|
components
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -160,7 +160,6 @@ endif(WIN32)
|
||||||
|
|
||||||
find_package(Boost REQUIRED COMPONENTS ${BOOST_COMPONENTS})
|
find_package(Boost REQUIRED COMPONENTS ${BOOST_COMPONENTS})
|
||||||
|
|
||||||
find_package(Qt4 COMPONENTS QtCore QtGui QtNetwork REQUIRED)
|
|
||||||
include(${QT_USE_FILE})
|
include(${QT_USE_FILE})
|
||||||
|
|
||||||
qt4_wrap_ui(OPENCS_UI_HDR ${OPENCS_UI})
|
qt4_wrap_ui(OPENCS_UI_HDR ${OPENCS_UI})
|
||||||
|
@ -208,7 +207,9 @@ target_link_libraries(openmw-cs
|
||||||
${SHINY_LIBRARIES}
|
${SHINY_LIBRARIES}
|
||||||
${Boost_LIBRARIES}
|
${Boost_LIBRARIES}
|
||||||
${BULLET_LIBRARIES}
|
${BULLET_LIBRARIES}
|
||||||
${QT_LIBRARIES}
|
${QT_QTGUI_LIBRARY}
|
||||||
|
${QT_QTCORE_LIBRARY}
|
||||||
|
${QT_QTNETWORK_LIBRARY}
|
||||||
components
|
components
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,6 @@ endif (OPENMW_USE_UNSHIELD)
|
||||||
|
|
||||||
source_group(wizard FILES ${WIZARD} ${WIZARD_HEADER})
|
source_group(wizard FILES ${WIZARD} ${WIZARD_HEADER})
|
||||||
|
|
||||||
find_package(Qt4 REQUIRED)
|
|
||||||
set(QT_USE_QTGUI 1)
|
set(QT_USE_QTGUI 1)
|
||||||
|
|
||||||
# Set some platform specific settings
|
# Set some platform specific settings
|
||||||
|
@ -113,7 +112,8 @@ add_executable(openmw-wizard
|
||||||
|
|
||||||
target_link_libraries(openmw-wizard
|
target_link_libraries(openmw-wizard
|
||||||
${Boost_LIBRARIES}
|
${Boost_LIBRARIES}
|
||||||
${QT_LIBRARIES}
|
${QT_QTGUI_LIBRARY}
|
||||||
|
${QT_QTCORE_LIBRARY}
|
||||||
components
|
components
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -126,11 +126,6 @@ add_component_dir (version
|
||||||
set (ESM_UI ${CMAKE_SOURCE_DIR}/files/ui/contentselector.ui
|
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)
|
if(QT_QTGUI_LIBRARY AND QT_QTCORE_LIBRARY)
|
||||||
add_component_qt_dir (contentselector
|
add_component_qt_dir (contentselector
|
||||||
model/modelitem model/esmfile
|
model/modelitem model/esmfile
|
||||||
|
@ -167,16 +162,15 @@ target_link_libraries(components
|
||||||
${Boost_LIBRARIES}
|
${Boost_LIBRARIES}
|
||||||
${OGRE_LIBRARIES}
|
${OGRE_LIBRARIES}
|
||||||
${OENGINE_LIBRARY}
|
${OENGINE_LIBRARY}
|
||||||
|
${QT_QTCORE_LIBRARY}
|
||||||
|
${QT_QTGUI_LIBRARY}
|
||||||
|
${BULLET_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
if (GIT_CHECKOUT)
|
if (GIT_CHECKOUT)
|
||||||
add_dependencies (components git-version)
|
add_dependencies (components git-version)
|
||||||
endif (GIT_CHECKOUT)
|
endif (GIT_CHECKOUT)
|
||||||
|
|
||||||
if(MINGW)
|
|
||||||
target_link_libraries(components ${QT_LIBRARIES} ${BULLET_LIBRARIES})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
target_link_libraries(components shlwapi)
|
target_link_libraries(components shlwapi)
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in a new issue