Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

186 lines (145 sloc) 5.06 kb
cmake_minimum_required( VERSION 2.6 )
if (NOT CMAKE_BUILD_TYPE)
set ( CMAKE_BUILD_TYPE Release )
endif (NOT CMAKE_BUILD_TYPE)
if (CMAKE_BUILD_TYPE MATCHES [Dd]ebug)
message(STATUS "Debug build")
add_definitions(-DDEBUG)
else()
message(STATUS "non-debug build")
add_definitions(-DNDEBUG)
endif()
if (NOT CMAKE_INSTALL_PREFIX)
message(FATAL_ERROR "CMAKE_INSTALL_PREFIX is not set but it has to be. Something is wrong.")
endif ()
set(MAJOR_VERSION 0)
set(MINOR_VERSION 4)
set(PATCH_VERSION 99)
set(RAZOR_VERSION ${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION})
add_definitions(-DRAZOR_VERSION=\"${RAZOR_VERSION}\")
message(STATUS "")
message(STATUS "Razor-qt version: ${RAZOR_VERSION}")
message(STATUS "")
link_directories(/usr/local/lib/)
add_definitions ( -Wall )
set( QT_USE_QTDBUS 1 )
find_package ( Qt4 4.6.0 REQUIRED )
include ( ${QT_USE_FILE} )
include_directories (
${QT_QTCORE_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR}
)
# additional cmake files
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
# Qt *must* be detected before this one
include(RazorInstallConfigPath)
add_definitions(-DRAZOR_ETC_XDG_DIRECTORY=\"${RAZOR_ETC_XDG_DIRECTORY}\")
include(RazorLibSuffix)
# This allows to install and read the configs from non-standard locations
add_definitions(-DSHARE_DIR=\"${CMAKE_INSTALL_PREFIX}/share/razor/\")
message(STATUS "")
message(STATUS "Developer documentation (doxygen) can be generated by 'make doc'")
message(STATUS "")
message(STATUS "")
message(STATUS "For building tests use -DBUILD_TESTS=Yes option.")
message(STATUS "")
# main build subdirs
macro (build_module MODULE_VAR MODULE_NAME MODULE_DIR MODULE_DEFAULT)
if(SPLIT_BUILD)
set(MODULE_BUILD_DEFAULT Off)
else(SPLIT_BUILD)
set(MODULE_BUILD_DEFAULT ${MODULE_DEFAULT})
endif(SPLIT_BUILD)
option(${MODULE_VAR} ${MODULE_NAME} ${MODULE_BUILD_DEFAULT})
if(${MODULE_VAR})
#message(STATUS "Build: ${MODULE_NAME}")
add_subdirectory(${MODULE_DIR})
list(APPEND ENABLED_MODULES "${MODULE_NAME}")
#else()
# message(STATUS "Skip: ${MODULE_VAR}")
endif(${MODULE_VAR})
endmacro()
build_module(MODULE_QTXDG
"Qt library for XDG standards"
libraries/qtxdg On)
build_module(MODULE_LIBRAZORQT
"Core Razor library"
libraries/razorqt On)
build_module(MODULE_LIBRAZORQXT
"Razor global hotkey library"
libraries/razorqxt On)
build_module(MODULE_LIBRAZORMOUNT
"Razor mount library"
libraries/razormount On)
build_module(MODULE_RESOURCES
"Razor resources"
razorqt-resources On)
build_module(MODULE_SESSION
"Razor Session manager"
razorqt-session On)
build_module(MODULE_PANEL
"Razor Panel"
razorqt-panel On)
build_module(MODULE_DESKTOP
"Razor Desktop"
razorqt-desktop On)
build_module(MODULE_APPSWITCHER
"Razor Alt-Tab Application switcher"
razorqt-appswitcher On)
build_module(MODULE_X11INFO
"X11 info"
razorqt-x11info On)
build_module(MODULE_RUNNER
"Razor Runner"
razorqt-runner On)
build_module(MODULE_CONFIG
"Razor Configuration"
razorqt-config On)
build_module(MODULE_POWER
"Razor power control"
razorqt-power On)
build_module(MODULE_AUTOSUSPEND
"Razor Autosuspend"
razorqt-autosuspend On)
build_module(MODULE_POLICYKIT
"Razor PolicyKit agent"
razorqt-policykit On)
build_module(MODULE_LIGHTDM
"Razor LightDM greeter"
razorqt-lightdm-greeter On)
build_module(MODULE_NOTIFICATIOND
"Razor Notifications Daemon"
razorqt-notificationd On)
build_module(MODULE_ASKPASS
"SSH Askpass"
razorqt-openssh-askpass On)
build_module(MODULE_ABOUT
"Razor information"
razorqt-about On)
build_module(MODULE_GLOBALKEYSHORTCUTS
"Global Shortcut daemon"
razorqt-globalkeyshortcuts On)
build_module(MODULE_CONFUPDATE
"Configuration updater"
razorqt-confupdate On)
message(STATUS "**************** The following modules will be built ****************")
foreach (MODULE_NAME ${ENABLED_MODULES})
message(STATUS " ${MODULE_NAME}")
endforeach()
message(STATUS "*********************************************************************")
########### Add uninstall target ###############
CONFIGURE_FILE(
"${CMAKE_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
ADD_CUSTOM_TARGET(uninstall
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake")
########## Add make dist target ################
SET(CPACK_PACKAGE_VERSION "${RAZOR_VERSION}")
SET(CPACK_SOURCE_GENERATOR "TBZ2")
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "razorqt-${CPACK_PACKAGE_VERSION}")
SET(CPACK_IGNORE_FILES "/CVS/;/\\\\.git\;/\\\\.svn/;\\\\.swp$;\\\\.#;/#;\\\\.tar.gz$;/CMakeFiles/;CMakeCache.txt;refresh-copyright-and-license.pl")
SET(CPACK_SOURCE_IGNORE_FILES ${CPACK_IGNORE_FILES})
INCLUDE(CPack)
# simulate autotools' "make dist"
add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
add_subdirectory( doxygen )
Jump to Line
Something went wrong with that request. Please try again.