mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 10:58:52 +00:00
add qt3 support
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14156 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d46add7754
commit
118cdb2bd3
@ -1,5 +1,3 @@
|
||||
project(lyx)
|
||||
|
||||
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/modules")
|
||||
|
||||
@ -11,7 +9,26 @@ if(release)
|
||||
set(release)
|
||||
endif(release)
|
||||
|
||||
find_package(Qt4 REQUIRED)
|
||||
|
||||
if(qt3)
|
||||
set(qt_postfix qt3)
|
||||
project(lyx-${qt_postfix})
|
||||
set(QT_MT_REQUIRED TRUE)
|
||||
find_package(Qt3 REQUIRED)
|
||||
set(qt3)
|
||||
set(build_qt3_frontend TRUE)
|
||||
if(QT_FOUND)
|
||||
message("-- Found Qt3: ${QT_QT_LIBRARY}")
|
||||
else(QT_FOUND)
|
||||
MESSAGE( FATAL_ERROR "Qt3 not found")
|
||||
endif(QT_FOUND)
|
||||
else(qt3)
|
||||
set(qt_postfix qt4)
|
||||
project(lyx-${qt_postfix})
|
||||
find_package(Qt4 REQUIRED)
|
||||
|
||||
endif(qt3)
|
||||
|
||||
find_package(ZLIB REQUIRED)
|
||||
|
||||
|
||||
@ -50,7 +67,6 @@ include(ConfigureChecks.cmake)
|
||||
configure_file(config.h.cmake ${CMAKE_BINARY_DIR}/config.h )
|
||||
|
||||
|
||||
|
||||
if(MSVC)
|
||||
if(MSVC_IDE)
|
||||
add_definitions(-DBOOST_USER_CONFIG=<\;config.h>\;)
|
||||
@ -75,7 +91,6 @@ include_directories(
|
||||
${QT_INCLUDES}
|
||||
)
|
||||
|
||||
|
||||
add_subdirectory(boost)
|
||||
add_subdirectory(intl)
|
||||
add_subdirectory(src)
|
||||
|
@ -11,7 +11,7 @@ endmacro(lyx_add_path _out _prefix)
|
||||
|
||||
#create the implementation files from the ui files and add them to the list of sources
|
||||
#usage: LYX_ADD_QT4_UI_FILES(foo_SRCS ${ui_files})
|
||||
macro (LYX_ADD_QT4_UI_FILES _sources )
|
||||
macro (LYX_ADD_UI_FILES _sources )
|
||||
foreach (_current_FILE ${ARGN})
|
||||
|
||||
get_filename_component(_tmp_FILE ${_current_FILE} ABSOLUTE)
|
||||
@ -33,12 +33,14 @@ macro (LYX_ADD_QT4_UI_FILES _sources )
|
||||
)
|
||||
set(${_sources} ${${_sources}} ${_header})
|
||||
endforeach (_current_FILE)
|
||||
endmacro (LYX_ADD_QT4_UI_FILES)
|
||||
endmacro (LYX_ADD_UI_FILES)
|
||||
|
||||
|
||||
|
||||
MACRO (LYX_AUTOMOC)
|
||||
QT4_GET_MOC_INC_DIRS(_moc_INCS)
|
||||
if(QT4_GET_MOC_INC_DIRS)
|
||||
QT4_GET_MOC_INC_DIRS(_moc_INCS)
|
||||
endif(QT4_GET_MOC_INC_DIRS)
|
||||
|
||||
set(_matching_FILES )
|
||||
foreach (_current_FILE ${ARGN})
|
||||
|
@ -1,4 +1,4 @@
|
||||
project(lyx-qt4)
|
||||
project(lyx-${qt_postfix})
|
||||
|
||||
include_directories(${TOP_SRC_DIR}/src)
|
||||
|
||||
@ -30,17 +30,17 @@ endif(ASPELL_FOUND)
|
||||
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
add_executable(lyx-qt4
|
||||
add_executable(lyx-${qt_postfix}
|
||||
${lyx_sources}
|
||||
${lyx_headers}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/version.C
|
||||
)
|
||||
|
||||
target_link_libraries(lyx-qt4
|
||||
target_link_libraries(lyx-${qt_postfix}
|
||||
mathed
|
||||
insets
|
||||
frontends
|
||||
frontend_qt4
|
||||
frontend_${qt_postfix}
|
||||
graphics
|
||||
support
|
||||
intl
|
||||
@ -48,6 +48,7 @@ target_link_libraries(lyx-qt4
|
||||
boost_iostreams
|
||||
)
|
||||
|
||||
|
||||
if(ASPELL_FOUND)
|
||||
target_link_libraries(lyx-qt4 ${ASPELL_LIBRARY})
|
||||
target_link_libraries(lyx-${qt_postfix} ${ASPELL_LIBRARY})
|
||||
endif(ASPELL_FOUND)
|
||||
|
@ -3,7 +3,9 @@ project(frontends)
|
||||
include_directories(${TOP_SRC_DIR}/src/frontends)
|
||||
|
||||
add_subdirectory(controllers)
|
||||
add_subdirectory(qt4)
|
||||
add_subdirectory(${qt_postfix})
|
||||
|
||||
|
||||
|
||||
file(GLOB frontends_sources ${TOP_SRC_DIR}/src/frontends/*.C)
|
||||
file(GLOB frontends_headers ${TOP_SRC_DIR}/src/frontends/*.h)
|
||||
|
37
development/cmake/src/frontends/qt3/CMakeLists.txt
Normal file
37
development/cmake/src/frontends/qt3/CMakeLists.txt
Normal file
@ -0,0 +1,37 @@
|
||||
project(frontend_qt3)
|
||||
|
||||
file(GLOB frontends_qt3_sources ${TOP_SRC_DIR}/src/frontends/qt3/*.C)
|
||||
file(GLOB frontends_qt3_headers ${TOP_SRC_DIR}/src/frontends/qt3/*.h)
|
||||
file(GLOB frontend_qt3_UI ${TOP_SRC_DIR}/src/frontends/qt3/ui/*.ui)
|
||||
|
||||
lyx_add_ui_files(dummy_gen_in_ui ${frontend_qt3_UI})
|
||||
|
||||
QT_WRAP_UI(frontend_qt3 qt3_uic_h qt3_uic_cxx ${frontend_qt3_UI})
|
||||
|
||||
qt_wrap_cpp(frontend_qt3 qt3_moc ${frontends_qt3_headers})
|
||||
|
||||
source_group("Uic files" FILES ${frontend_qt3_UI})
|
||||
|
||||
add_definitions(-DQT_NO_STL)
|
||||
|
||||
include_directories( ${QT_INCLUDE_DIR}
|
||||
${TOP_SRC_DIR}/src/frontends/qt3
|
||||
${TOP_SRC_DIR}/src/frontends/controllers
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
add_library(frontend_qt3 STATIC
|
||||
${frontends_qt3_sources}
|
||||
${frontends_qt3_headers}
|
||||
${qt3_moc}
|
||||
${qt3_uic_cxx}
|
||||
${qt3_uic_h}
|
||||
)
|
||||
|
||||
target_link_libraries(frontend_qt3 ${QT_QT_LIBRARY} controllers)
|
||||
|
||||
|
||||
|
||||
if(WIN32)
|
||||
target_link_libraries(frontend_qt3 Gdi32)
|
||||
endif(WIN32)
|
||||
|
@ -8,7 +8,7 @@ file(GLOB frontend_qt4_UI ${TOP_SRC_DIR}/src/frontends/qt4/ui/*.ui)
|
||||
|
||||
lyx_automoc(${frontends_qt4_sources})
|
||||
|
||||
lyx_add_qt4_ui_files(frontends_qt4_sources ${frontend_qt4_UI})
|
||||
lyx_add_ui_files(frontends_qt4_sources ${frontend_qt4_UI})
|
||||
|
||||
source_group("Uic files" FILES ${frontend_qt4_UI})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user