From 0aa87e68b8fdc9d4cf93f4e9a89f7d2ad3913285 Mon Sep 17 00:00:00 2001 From: Michael Gehring Date: Fri, 20 Jun 2008 18:01:42 +0200 Subject: [PATCH] cmake: group external utilities --- CMakeLists.txt | 1 - awesomeConfig.cmake | 25 ++++++++++++++----------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 94fa85f99..bcc7af455 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -98,7 +98,6 @@ TARGET_LINK_LIBRARIES(${PROJECT_AWECLIENT_NAME} IF(AWESOME_GENERATE_MAN) # Create luadoc file - FIND_PROGRAM(CAT_EXECUTABLE cat) EXECUTE_PROCESS(COMMAND ${CAT_EXECUTABLE} ${AWE_SRCS} COMMAND ${LUA_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/build-utils/gendoc.lua OUTPUT_FILE ${AWE_LUADOC_FILE} diff --git a/awesomeConfig.cmake b/awesomeConfig.cmake index 114a9237f..df6038818 100644 --- a/awesomeConfig.cmake +++ b/awesomeConfig.cmake @@ -19,10 +19,23 @@ ADD_DEFINITIONS(-std=gnu99 -ggdb3 -fno-strict-aliasing -Wall -Wextra -Wpointer-arith -Wredundant-decls -Wformat-nonliteral -Wno-format-zero-length -Wmissing-format-attribute) +# {{{ external utilities +FIND_PROGRAM(CAT_EXECUTABLE cat) +FIND_PROGRAM(GIT_EXECUTABLE git) +FIND_PROGRAM(LUA_EXECUTABLE lua) +# programs needed for man pages +FIND_PROGRAM(ASCIIDOC_EXECUTABLE asciidoc) +FIND_PROGRAM(XMLTO_EXECUTABLE xmlto) +FIND_PROGRAM(GZIP_EXECUTABLE gzip) +# doxygen +INCLUDE(FindDoxygen) +# pkg-config +INCLUDE(FindPkgConfig) +# }}} + # If this is a git repository... IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git/HEAD) # ...update version - FIND_PROGRAM(GIT_EXECUTABLE git) IF(GIT_EXECUTABLE) EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} describe WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} @@ -31,9 +44,6 @@ IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git/HEAD) ENDIF() ENDIF() -# Check for doxygen -INCLUDE(FindDoxygen) -INCLUDE(FindPkgConfig) SET(AWE_COMMON_DIR common) SET(AWE_LAYOUT_DIR layouts) @@ -97,8 +107,6 @@ FIND_LIBRARY(LUA_LIB NAMES lua5.1 lua /usr/lib/lua /usr/local/lib) -FIND_PROGRAM(LUA_EXECUTABLE lua) - # Error check IF(NOT LIB_EV) MESSAGE( FATAL_ERROR "ev library not found") @@ -120,11 +128,6 @@ IF(DOXYGEN_EXECUTABLE) ADD_CUSTOM_TARGET(doc ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/awesome.doxygen) ENDIF() -# Check for programs needed for man pages -FIND_PROGRAM(ASCIIDOC_EXECUTABLE asciidoc) -FIND_PROGRAM(XMLTO_EXECUTABLE xmlto) -FIND_PROGRAM(GZIP_EXECUTABLE gzip) - IF(ASCIIDOC_EXECUTABLE AND XMLTO_EXECUTABLE AND GZIP_EXECUTABLE) SET(AWESOME_GENERATE_MAN TRUE) ENDIF()