mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-14 01:22:33 +00:00
86940dd605
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@15102 a592a061-630c-0410-9148-cb99ea01b6c8
110 lines
2.4 KiB
CMake
110 lines
2.4 KiB
CMake
# This file is part of LyX, the document processor.
|
|
# Licence details can be found in the file COPYING.
|
|
#
|
|
# Copyright (c) 2006, Peter Kümmel, <syntheticpp@gmx.net>
|
|
#
|
|
|
|
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
|
|
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/modules")
|
|
|
|
set (EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
|
|
|
|
set(PACKAGE lyx)
|
|
set(PACKAGE_VERSION 1.4.3)
|
|
|
|
|
|
if(NOT GROUP_CODE)
|
|
set(GROUP_CODE flat)
|
|
endif(NOT GROUP_CODE)
|
|
|
|
include(LyXPaths)
|
|
include(LyXMacros)
|
|
include(ProjectSourceGroup)
|
|
|
|
if(release)
|
|
set(CMAKE_BUILD_TYPE Release)
|
|
set(release)
|
|
endif(release)
|
|
|
|
|
|
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)
|
|
|
|
|
|
find_package(ZLIB REQUIRED)
|
|
find_package(ICONV REQUIRED)
|
|
add_definitions(-DHAVE_ICONV=1)
|
|
|
|
if(all OR aspell)
|
|
find_package(ASPELL REQUIRED)
|
|
else(all OR aspell)
|
|
find_package(ASPELL)
|
|
endif(all OR aspell)
|
|
set(aspell)
|
|
|
|
message("")
|
|
if(nls OR all)
|
|
add_definitions(-DENABLE_NLS=1)
|
|
message("----- Building with ENABLE_NLS")
|
|
else(nls OR all)
|
|
message("----- No nls, to enable use -Dnls=1")
|
|
endif(nls OR all)
|
|
set(nls)
|
|
if(ASPELL_FOUND)
|
|
add_definitions(-DUSE_ASPELL=1)
|
|
message("----- Building with USE_ASPELL")
|
|
else(ASPELL_FOUND)
|
|
message("----- No aspell, to get more information use -Daspell=1")
|
|
endif(ASPELL_FOUND)
|
|
message("")
|
|
set(all)
|
|
|
|
|
|
if(WIN32)
|
|
set(USE_WINDOWS_PACKAGING 1)
|
|
else(WIN32)
|
|
set(USE_POSIX_PACKAGING 1)
|
|
endif(WIN32)
|
|
|
|
# create config.h
|
|
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>\;)
|
|
else(MSVC_IDE)
|
|
add_definitions(-DBOOST_USER_CONFIG="<config.h>")
|
|
SET(CMAKE_EXE_LINKER_FLAGS /MANIFEST)
|
|
endif(MSVC_IDE)
|
|
|
|
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Zi -wd4996 -wd4800")
|
|
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -wd4996 -wd4800")
|
|
SET(CMAKE_C_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
|
|
SET(CMAKE_C_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
|
|
else(MSVC)
|
|
add_definitions(-DBOOST_USER_CONFIG="<config.h>")
|
|
endif(MSVC)
|
|
|
|
|
|
include_directories(
|
|
${CMAKE_BINARY_DIR}
|
|
${TOP_SRC_DIR}/src
|
|
${TOP_SRC_DIR}/boost
|
|
${QT_INCLUDES}
|
|
)
|
|
|
|
add_subdirectory(boost)
|
|
add_subdirectory(intl)
|
|
add_subdirectory(src)
|