]> git.lyx.org Git - lyx.git/blobdiff - development/cmake/CMakeLists.txt
A bunch of conversion to docstring.
[lyx.git] / development / cmake / CMakeLists.txt
index fcbab84648e8c1057d262ca1584ed41994406a61..bfa27f8307859c7e8fc0622d0c44e45cf89e61b3 100644 (file)
@@ -1,26 +1,43 @@
-project(lyx)
-
 # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
 set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/modules")
 
+if(NOT GROUP_CODE)
+       #set(GROUP_CODE "The Golden Code")
+       set(GROUP_CODE flat)
+endif(NOT GROUP_CODE)
+
 include(LyXPaths)
 include(LyXMacros)
+include(ProjectSourceGroup)
 
 if(release)
-       set(CMAKE_BUILD_TYPE TRUE)
+       set(CMAKE_BUILD_TYPE Release)
        set(release)
 endif(release) 
 
-find_package(Qt4 REQUIRED)
-find_package(ZLIB 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)     
 
-if(all OR nls)
-       find_package(ICONV REQUIRED)
-else(all OR nls)
-       find_package(ICONV)
-endif(all OR nls)
-set(nls)
+find_package(ZLIB REQUIRED)
+find_package(ICONV REQUIRED)
+add_definitions(-DHAVE_ICONV=1)
 
 if(all OR aspell)
        find_package(ASPELL REQUIRED)
@@ -30,12 +47,13 @@ endif(all OR aspell)
 set(aspell)
 
 message("")
-if(ICONV_FOUND)
-       add_definitions(-DENABLE_NLS=1 -DHAVE_ICONV=1)
-       message("----- Building with ENABLE_NLS and HAVE_ICONV")
-else(ICONV_FOUND)
-       message("----- No iconv found, to get more information use -Dnls=1")
-endif(ICONV_FOUND)
+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")
@@ -50,7 +68,6 @@ include(ConfigureChecks.cmake)
 configure_file(config.h.cmake ${CMAKE_BINARY_DIR}/config.h )
 
 
-
 if(MSVC)
        if(MSVC_IDE)
                add_definitions(-DBOOST_USER_CONFIG=&lt\;config.h&gt\;)
@@ -75,7 +92,6 @@ include_directories(
        ${QT_INCLUDES} 
 )
 
-
 add_subdirectory(boost)
 add_subdirectory(intl)
 add_subdirectory(src)