mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-01 03:21:41 +00:00
Do no link binaries with Qt where it's not used
Define components_qt static library with all qt dependent components that also depends on other components. Link only cs, wizard and launcher with qt dependent components.
This commit is contained in:
parent
6360bdc859
commit
e9b8933b2f
@ -14,6 +14,7 @@
|
|||||||
Bug #5379: Wandering NPCs falling through cantons
|
Bug #5379: Wandering NPCs falling through cantons
|
||||||
Bug #5453: Magic effect VFX are offset for creatures
|
Bug #5453: Magic effect VFX are offset for creatures
|
||||||
Bug #5483: AutoCalc flag is not used to calculate spells cost
|
Bug #5483: AutoCalc flag is not used to calculate spells cost
|
||||||
|
Bug #5508: Engine binary links to Qt without using it
|
||||||
Bug #5755: Active grid object paging - disappearing textures
|
Bug #5755: Active grid object paging - disappearing textures
|
||||||
Bug #5788: Texture editing parses the selected indexes wrongly
|
Bug #5788: Texture editing parses the selected indexes wrongly
|
||||||
Bug #5842: GetDisposition adds temporary disposition change from different actors
|
Bug #5842: GetDisposition adds temporary disposition change from different actors
|
||||||
|
@ -542,7 +542,6 @@ endif()
|
|||||||
|
|
||||||
# Components
|
# Components
|
||||||
add_subdirectory (components)
|
add_subdirectory (components)
|
||||||
target_compile_definitions(components PRIVATE OPENMW_DOC_BASEURL="${OPENMW_DOC_BASEURL}")
|
|
||||||
|
|
||||||
# Apps and tools
|
# Apps and tools
|
||||||
if (BUILD_OPENMW)
|
if (BUILD_OPENMW)
|
||||||
|
@ -99,7 +99,7 @@ endif (WIN32)
|
|||||||
target_link_libraries(openmw-launcher
|
target_link_libraries(openmw-launcher
|
||||||
${SDL2_LIBRARY_ONLY}
|
${SDL2_LIBRARY_ONLY}
|
||||||
${OPENAL_LIBRARY}
|
${OPENAL_LIBRARY}
|
||||||
components
|
components_qt
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(openmw-launcher Qt5::Widgets Qt5::Core)
|
target_link_libraries(openmw-launcher Qt5::Widgets Qt5::Core)
|
||||||
|
@ -229,7 +229,7 @@ target_link_libraries(openmw-cs
|
|||||||
${Boost_SYSTEM_LIBRARY}
|
${Boost_SYSTEM_LIBRARY}
|
||||||
${Boost_FILESYSTEM_LIBRARY}
|
${Boost_FILESYSTEM_LIBRARY}
|
||||||
${Boost_PROGRAM_OPTIONS_LIBRARY}
|
${Boost_PROGRAM_OPTIONS_LIBRARY}
|
||||||
components
|
components_qt
|
||||||
)
|
)
|
||||||
|
|
||||||
if(OSG_STATIC)
|
if(OSG_STATIC)
|
||||||
|
@ -99,7 +99,7 @@ openmw_add_executable(openmw-wizard
|
|||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(openmw-wizard
|
target_link_libraries(openmw-wizard
|
||||||
components
|
components_qt
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(openmw-wizard Qt5::Widgets Qt5::Core)
|
target_link_libraries(openmw-wizard Qt5::Widgets Qt5::Core)
|
||||||
|
@ -78,7 +78,7 @@ foreach (u ${ARGN})
|
|||||||
file (GLOB ALL "${dir}/${u}.[ch]pp")
|
file (GLOB ALL "${dir}/${u}.[ch]pp")
|
||||||
foreach (f ${ALL})
|
foreach (f ${ALL})
|
||||||
list (APPEND files "${f}")
|
list (APPEND files "${f}")
|
||||||
list (APPEND COMPONENT_FILES "${f}")
|
list (APPEND COMPONENT_QT_FILES "${f}")
|
||||||
endforeach (f)
|
endforeach (f)
|
||||||
file (GLOB MOC_H "${dir}/${u}.hpp")
|
file (GLOB MOC_H "${dir}/${u}.hpp")
|
||||||
foreach (fi ${MOC_H})
|
foreach (fi ${MOC_H})
|
||||||
|
@ -217,7 +217,7 @@ if (USE_QT)
|
|||||||
processinvoker
|
processinvoker
|
||||||
)
|
)
|
||||||
|
|
||||||
add_component_dir (misc
|
add_component_qt_dir (misc
|
||||||
helpviewer
|
helpviewer
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -233,7 +233,7 @@ endif ()
|
|||||||
|
|
||||||
include_directories(${BULLET_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR})
|
include_directories(${BULLET_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
||||||
add_library(components STATIC ${COMPONENT_FILES} ${MOC_SRCS} ${ESM_UI_HDR})
|
add_library(components STATIC ${COMPONENT_FILES})
|
||||||
|
|
||||||
target_link_libraries(components
|
target_link_libraries(components
|
||||||
# CMake's built-in OSG finder does not use pkgconfig, so we have to
|
# CMake's built-in OSG finder does not use pkgconfig, so we have to
|
||||||
@ -276,7 +276,9 @@ if (WIN32)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (USE_QT)
|
if (USE_QT)
|
||||||
target_link_libraries(components Qt5::Widgets Qt5::Core)
|
add_library(components_qt STATIC ${COMPONENT_QT_FILES} ${MOC_SRCS} ${ESM_UI_HDR})
|
||||||
|
target_link_libraries(components_qt components Qt5::Widgets Qt5::Core)
|
||||||
|
target_compile_definitions(components_qt PRIVATE OPENMW_DOC_BASEURL="${OPENMW_DOC_BASEURL}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (GIT_CHECKOUT)
|
if (GIT_CHECKOUT)
|
||||||
|
Loading…
Reference in New Issue
Block a user