mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 10:58:52 +00:00
avoid qt4 variable names in cmake build
This commit is contained in:
parent
b06abbbdbc
commit
63976066ad
@ -690,8 +690,8 @@ if(LYX_PCH)
|
|||||||
COMPILE_FLAGS "/Ycconfig.h /Fp\$(IntDir)/config.pch")
|
COMPILE_FLAGS "/Ycconfig.h /Fp\$(IntDir)/config.pch")
|
||||||
set(${name_}_sources ${${name_}_sources} ${TOP_BINARY_DIR}/config_pch.cpp
|
set(${name_}_sources ${${name_}_sources} ${TOP_BINARY_DIR}/config_pch.cpp
|
||||||
${TOP_BINARY_DIR}/pcheaders.h)
|
${TOP_BINARY_DIR}/pcheaders.h)
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /DLYX_PCH_STL /DLYX_PCH_BOOST /DLYX_PCH_QT4")
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /DLYX_PCH_STL /DLYX_PCH_BOOST /DLYX_PCH_QT")
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /DLYX_PCH_STL /DLYX_PCH_BOOST /DLYX_PCH_QT4")
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /DLYX_PCH_STL /DLYX_PCH_BOOST /DLYX_PCH_QT")
|
||||||
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /DLYX_PCH_STL /DLYX_PCH_BOOST")
|
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /DLYX_PCH_STL /DLYX_PCH_BOOST")
|
||||||
endmacro(lyx_add_msvc_pch)
|
endmacro(lyx_add_msvc_pch)
|
||||||
macro(lyx_add_gcc_pch name_)
|
macro(lyx_add_gcc_pch name_)
|
||||||
@ -700,7 +700,7 @@ if(LYX_PCH)
|
|||||||
macro(lyx_add_msvc_pch name_)
|
macro(lyx_add_msvc_pch name_)
|
||||||
endmacro()
|
endmacro()
|
||||||
macro(lyx_add_gcc_pch name_)
|
macro(lyx_add_gcc_pch name_)
|
||||||
add_definitions(-DLYX_PCH_STL -DLYX_PCH_BOOST -DLYX_PCH_QT4)
|
add_definitions(-DLYX_PCH_STL -DLYX_PCH_BOOST -DLYX_PCH_QT)
|
||||||
ADD_PRECOMPILED_HEADER(${name_} ${TOP_BINARY_DIR}/config_pch.cpp ${TOP_BINARY_DIR}/config.h.gch)
|
ADD_PRECOMPILED_HEADER(${name_} ${TOP_BINARY_DIR}/config_pch.cpp ${TOP_BINARY_DIR}/config.h.gch)
|
||||||
endmacro()
|
endmacro()
|
||||||
endif()
|
endif()
|
||||||
|
@ -40,7 +40,7 @@ endmacro(lyx_add_path _out _prefix)
|
|||||||
|
|
||||||
#create the implementation files from the ui files and add them
|
#create the implementation files from the ui files and add them
|
||||||
#to the list of sources
|
#to the list of sources
|
||||||
#usage: LYX_ADD_QT4_UI_FILES(foo_SRCS ${ui_files})
|
#usage: LYX_ADD_UI_FILES(foo_SRCS ${ui_files})
|
||||||
macro(LYX_ADD_UI_FILES _sources _ui_files)
|
macro(LYX_ADD_UI_FILES _sources _ui_files)
|
||||||
set(uifiles})
|
set(uifiles})
|
||||||
foreach (_current_FILE ${ARGN})
|
foreach (_current_FILE ${ARGN})
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if defined(LYX_PCH_QT4) && defined(LYX_BUILD_QT4_FRONTEND)
|
#if defined(LYX_PCH_QT) && defined(LYX_BUILD_QT_FRONTEND)
|
||||||
#include <QtCore>
|
#include <QtCore>
|
||||||
#include <QtGui>
|
#include <QtGui>
|
||||||
#endif
|
#endif
|
||||||
|
@ -4,23 +4,23 @@
|
|||||||
# Copyright (c) 2006-2011 Peter Kümmel, <syntheticpp@gmx.net>
|
# Copyright (c) 2006-2011 Peter Kümmel, <syntheticpp@gmx.net>
|
||||||
#
|
#
|
||||||
|
|
||||||
project(frontend_qt4)
|
project(frontend_qt)
|
||||||
|
|
||||||
file(GLOB frontends_qt4_sources ${TOP_SRC_DIR}/src/frontends/qt4/${LYX_CPP_FILES})
|
file(GLOB frontends_qt_sources ${TOP_SRC_DIR}/src/frontends/qt4/${LYX_CPP_FILES})
|
||||||
file(GLOB moc_files ${TOP_SRC_DIR}/src/frontends/qt4/${LYX_MOC_FILES})
|
file(GLOB moc_files ${TOP_SRC_DIR}/src/frontends/qt4/${LYX_MOC_FILES})
|
||||||
|
|
||||||
list(REMOVE_ITEM frontends_qt4_sources ${moc_files} .)
|
list(REMOVE_ITEM frontends_qt_sources ${moc_files} .)
|
||||||
list(REMOVE_ITEM frontends_qt4_sources ${TOP_SRC_DIR}/src/frontends/qt4/liblyxqt4.cpp)
|
list(REMOVE_ITEM frontends_qt_sources ${TOP_SRC_DIR}/src/frontends/qt4/liblyxqt4.cpp)
|
||||||
list(REMOVE_ITEM frontends_qt4_sources ${TOP_SRC_DIR}/src/frontends/qt4/Resources.cpp)
|
list(REMOVE_ITEM frontends_qt_sources ${TOP_SRC_DIR}/src/frontends/qt4/Resources.cpp)
|
||||||
|
|
||||||
file(GLOB frontends_qt4_headers ${TOP_SRC_DIR}/src/frontends/qt4/${LYX_HPP_FILES})
|
file(GLOB frontends_qt_headers ${TOP_SRC_DIR}/src/frontends/qt4/${LYX_HPP_FILES})
|
||||||
file(GLOB frontend_qt4_UI ${TOP_SRC_DIR}/src/frontends/qt4/ui/*.ui)
|
file(GLOB frontend_qt_UI ${TOP_SRC_DIR}/src/frontends/qt4/ui/*.ui)
|
||||||
|
|
||||||
lyx_add_msvc_pch(frontends_qt4)
|
lyx_add_msvc_pch(frontends_qt4)
|
||||||
|
|
||||||
lyx_automoc(${frontends_qt4_sources})
|
lyx_automoc(${frontends_qt_sources})
|
||||||
|
|
||||||
lyx_add_ui_files(frontends_qt4_sources ui_files ${frontend_qt4_UI})
|
lyx_add_ui_files(frontends_qt_sources ui_files ${frontend_qt_UI})
|
||||||
|
|
||||||
set(resource_name ${CMAKE_CURRENT_BINARY_DIR}/Resources.qrc)
|
set(resource_name ${CMAKE_CURRENT_BINARY_DIR}/Resources.qrc)
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ add_custom_command(
|
|||||||
|
|
||||||
qt_add_resources(resource_files ${resource_name})
|
qt_add_resources(resource_files ${resource_name})
|
||||||
|
|
||||||
add_definitions(-DQT_GENUINE_STR -DLYX_BUILD_QT4_FRONTEND)
|
add_definitions(-DQT_GENUINE_STR -DLYX_BUILD_QT_FRONTEND)
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
${TOP_SRC_DIR}/src/frontends/qt4
|
${TOP_SRC_DIR}/src/frontends/qt4
|
||||||
@ -44,23 +44,23 @@ include_directories(
|
|||||||
${CMAKE_CURRENT_BINARY_DIR})
|
${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
||||||
if(LYX_MERGE_FILES)
|
if(LYX_MERGE_FILES)
|
||||||
lyx_const_touched_files(_allinone frontends_qt4_sources)
|
lyx_const_touched_files(_allinone frontends_qt_sources)
|
||||||
set(depends_moc_uic ${frontends_qt4_headers} ${ui_files})
|
set(depends_moc_uic ${frontends_qt_headers} ${ui_files})
|
||||||
set_source_files_properties(_allinone_const.C PROPERTIES OBJECT_DEPENDS "${depends_moc_uic}")
|
set_source_files_properties(_allinone_const.C PROPERTIES OBJECT_DEPENDS "${depends_moc_uic}")
|
||||||
set_source_files_properties(_allinone_touched.C PROPERTIES OBJECT_DEPENDS "${depends_moc_uic}")
|
set_source_files_properties(_allinone_touched.C PROPERTIES OBJECT_DEPENDS "${depends_moc_uic}")
|
||||||
add_library(frontend_qt4 ${library_type}
|
add_library(frontend_qt ${library_type}
|
||||||
${_allinone_files} ${frontends_qt4_headers} ${ui_files} ${resource_files})
|
${_allinone_files} ${frontends_qt_headers} ${ui_files} ${resource_files})
|
||||||
else()
|
else()
|
||||||
add_library(frontend_qt4 ${library_type} ${frontends_qt4_sources} ${frontends_qt4_headers} ${ui_files} ${resource_files})
|
add_library(frontend_qt ${library_type} ${frontends_qt_sources} ${frontends_qt_headers} ${ui_files} ${resource_files})
|
||||||
endif()
|
endif()
|
||||||
set_target_properties(frontend_qt4 PROPERTIES FOLDER "applications/LyX")
|
set_target_properties(frontend_qt PROPERTIES FOLDER "applications/LyX")
|
||||||
|
|
||||||
if(Qt5Core_FOUND AND APPLE)
|
if(Qt5Core_FOUND AND APPLE)
|
||||||
qt_use_modules(frontend_qt4 Core Gui Widgets Concurrent MacExtras)
|
qt_use_modules(frontend_qt Core Gui Widgets Concurrent MacExtras)
|
||||||
else()
|
else()
|
||||||
qt_use_modules(frontend_qt4 Core Gui Widgets Concurrent)
|
qt_use_modules(frontend_qt Core Gui Widgets Concurrent)
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(frontend_qt4
|
target_link_libraries(frontend_qt
|
||||||
frontends
|
frontends
|
||||||
${QT_QTCORE_LIBRARY}
|
${QT_QTCORE_LIBRARY}
|
||||||
${QT_QTGUI_LIBRARY})
|
${QT_QTGUI_LIBRARY})
|
||||||
@ -68,10 +68,10 @@ target_link_libraries(frontend_qt4
|
|||||||
lyx_add_gcc_pch(frontend_qt4)
|
lyx_add_gcc_pch(frontend_qt4)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
target_link_libraries(frontend_qt4 gdi32)
|
target_link_libraries(frontend_qt gdi32)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
project_source_group("${GROUP_CODE}" frontends_qt4_sources frontends_qt4_headers)
|
project_source_group("${GROUP_CODE}" frontends_qt_sources frontends_qt_headers)
|
||||||
|
|
||||||
source_group("Uic files" FILES ${frontend_qt4_UI})
|
source_group("Uic files" FILES ${frontend_qt_UI})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user