Make it possible to 'compile' kdesrc-build without KDE installed.

It's a bit of a chicken and egg problem, otherwise. Well, of course one
can use kdesrc-build uninstalled, but this way an automated build host
can just start with "./kdesrc-build/kdesrc-build kdesrc-build" to ensure
it's up-to-date :-)
wilder
David Faure 15 years ago
parent 68ef215870
commit b458d08f8c
  1. 14
      CMakeLists.txt

@ -1,12 +1,16 @@
cmake_minimum_required(VERSION 2.6) # Pretty much nothing works without this
project(kdesrc-build)
find_package(KDE4 REQUIRED) # Needed for the docs
find_package(KDE4) # Needed for the docs, but optional.
include(KDE4Defaults)
include(MacroLibrary)
macro_optional_add_subdirectory(doc)
if (KDE4_FOUND)
include(KDE4Defaults)
include(MacroLibrary)
macro_optional_add_subdirectory(doc)
else()
set(DATA_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/apps" CACHE PATH "The parent directory where applications can install their data")
set(BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "The install dir for executables")
endif()
install(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/kdesrc-build DESTINATION ${BIN_INSTALL_DIR})
install(FILES kdesrc-buildrc.xml DESTINATION ${DATA_INSTALL_DIR}/katepart/syntax)

Loading…
Cancel
Save