CMAKE_MINIMUM_REQUIRED(VERSION 2.6) PROJECT(MOO) SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules) FIND_PACKAGE(MooCmake) MOO_DEFINE_VERSIONS("0.10.5-unstable") SET(MOO_PACKAGE_NAME moo) SET(MOO_EMAIL "emuntyan@sourceforge.net") SET(MOO_COPYRIGHT "2004-2010 Yevgen Muntyan <${MOO_EMAIL}>") SET(PACKAGE_BUGREPORT ${MOO_EMAIL}) SET(MOO_PACKAGE_VENDOR ${MOO_EMAIL}) MOO_OPTION(MOO_BUILD_CTAGS ${MOO_OS_UNIX} "Build Ctags plugin" HIDDEN ${MOO_OS_WIN32} HEADER TRUE) MOO_OPTION(MOO_ENABLE_PROJECT FALSE "Build project plugin" HIDDEN TRUE) MOO_OPTION(MOO_ENABLE_UNIT_TESTS FALSE "Build unit tests" DEFINE TRUE) MOO_OPTION(MOO_ENABLE_GENERATED_FILES ${MOO_OS_UNIX} "Run gtk-update-icon-cache on install") MOO_OPTION(MOO_BROKEN_GTK_THEME FALSE "Work around bugs in gtk theme" HEADER TRUE) INCLUDE(cmake/gtk.cmake) INCLUDE(cmake/moo.cmake) INCLUDE(cmake/dist.cmake) SET(MOO_MODULE_MAJOR_VERSION 1) SET(MOO_MODULE_MINOR_VERSION 0) SET(MOO_MODULE_VERSION \"${MOO_MODULE_MAJOR_VERSION}.${MOO_MODULE_MINOR_VERSION}\") ADD_DEFINITIONS(-DHAVE_CONFIG_H) ADD_DEFINITIONS(-DGETTEXT_PACKAGE=\"moo\") ADD_DEFINITIONS(-DG_LOG_DOMAIN=\"Moo\") INCLUDE_DIRECTORIES(${MOO_BINARY_DIR} ${MOO_BINARY_DIR}/moo ${MOO_SOURCE_DIR}/moo) ADD_DEFINITIONS(${GTK_CFLAGS} ${GTK_CFLAGS_OTHER}) INCLUDE(config.cmake) ADD_SUBDIRECTORY(doc) ADD_SUBDIRECTORY(moo) ADD_SUBDIRECTORY(plugins) ADD_SUBDIRECTORY(medit) MOO_ADD_MSG_CATALOG(moo po) MOO_ADD_MSG_CATALOG(moo-gsv po-gsv) MOO_WRITE_CONFIG_H(config.h.in config.h @ONLY) CONFIGURE_FILE(config-dirs.h.in config-dirs.h @ONLY) IF(WIN32) GET_FILENAME_COMPONENT(_MOO_SOURCE_DIR ${MOO_SOURCE_DIR} ABSOLUTE) # TO_NATIVE_PATH damn it! Cmake is such a wonderful piece of language... STRING(REPLACE "/" "\\" _MOO_SOURCE_DIR "${_MOO_SOURCE_DIR}") GET_FILENAME_COMPONENT(_MOO_BINARY_DIR ${MOO_BINARY_DIR} ABSOLUTE) STRING(REPLACE "/" "\\" _MOO_BINARY_DIR "${_MOO_BINARY_DIR}") SET(_MOO_RUN_HOW "@") CONFIGURE_FILE(plat/win32/run-medit.in run-medit.bat) SET(_MOO_RUN_HOW "gdb --args ") CONFIGURE_FILE(plat/win32/run-medit.in run-medit-in-gdb.bat) ENDIF(WIN32) IF(NOT WIN32) INSTALL(PROGRAMS plat/unix/xdg-open plat/unix/xdg-email plat/unix/moo-open-html-help DESTINATION ${MOO_DATA_DIR}/scripts) ENDIF(NOT WIN32)