1 # This file is part of LyX, the document processor.
2 # Licence details can be found in the file COPYING.
4 # Copyright (c) 2006, Peter Kümmel, <syntheticpp@gmx.net>
7 # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
8 set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/modules")
10 set (EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
13 set(PACKAGE_VERSION 1.5.0svn)
14 set(LYX_DATE "not released yet")
16 set(VERSION_INFO "CMake Build")
19 set(USE_WINDOWS_PACKAGING 1)
21 set(USE_POSIX_PACKAGING 1)
25 #set(GROUP_CODE "The Golden Code")
31 include(ProjectSourceGroup)
34 set(CMAKE_BUILD_TYPE Release)
41 project(lyx-${qt_postfix})
42 set(QT_MT_REQUIRED TRUE)
43 find_package(Qt3 REQUIRED)
45 set(build_qt3_frontend TRUE)
47 message("-- Found Qt3: ${QT_QT_LIBRARY}")
49 MESSAGE( FATAL_ERROR "Qt3 not found")
53 project(lyx-${qt_postfix})
54 find_package(Qt4 REQUIRED)
58 find_package(ZLIB REQUIRED)
59 find_package(ICONV REQUIRED)
60 add_definitions(-DHAVE_ICONV=1)
63 find_package(ASPELL REQUIRED)
71 add_definitions(-DENABLE_NLS=1)
72 message("----- Building with ENABLE_NLS")
74 message("----- No nls, to enable use -Dnls=1")
78 add_definitions(-DUSE_ASPELL=1)
79 message("----- Building with USE_ASPELL")
81 message("----- No aspell, to get more information use -Daspell=1")
87 include(ConfigureChecks.cmake)
88 configure_file(config.h.cmake ${CMAKE_BINARY_DIR}/config.h )
93 add_definitions(-DBOOST_USER_CONFIG=<\;config.h>\;)
95 add_definitions(-DBOOST_USER_CONFIG="<config.h>")
96 SET(CMAKE_EXE_LINKER_FLAGS /MANIFEST)
99 SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Zi -wd4996 -wd4800" CACHE STRING "runtime-library flags" FORCE)
100 SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -wd4996 -wd4800" CACHE STRING "runtime-library flags" FORCE)
101 SET(CMAKE_C_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
102 SET(CMAKE_C_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
104 add_definitions(-DBOOST_USER_CONFIG="<config.h>")
108 #TODO: insource is not the best place
109 configure_file(${TOP_SRC_DIR}/lib/lyx2lyx/lyx2lyx_version.py.in
110 ${TOP_SRC_DIR}/lib/lyx2lyx/lyx2lyx_version.py)
119 add_subdirectory(boost)
120 add_subdirectory(intl)
121 add_subdirectory(src)