cmake: clean stuff
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
11cdef7839
commit
edc5d7d528
246
CMakeLists.txt
246
CMakeLists.txt
|
@ -1,152 +1,136 @@
|
||||||
IF( NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/awesomeConfig.cmake )
|
IF(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/awesomeConfig.cmake)
|
||||||
MESSAGE( FATAL "Please provide awesomeConfig.cmake" )
|
MESSAGE(FATAL "Please provide awesomeConfig.cmake")
|
||||||
ENDIF( NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/awesomeConfig.cmake )
|
ENDIF()
|
||||||
|
|
||||||
CMAKE_MINIMUM_REQUIRED( VERSION 2.4 )
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
|
||||||
|
|
||||||
INCLUDE( awesomeConfig.cmake )
|
INCLUDE(awesomeConfig.cmake)
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES( ${AWE_INC_DIR} )
|
INCLUDE_DIRECTORIES(${AWE_INC_DIR})
|
||||||
|
|
||||||
SET( AWE_LUA_FILES ${CMAKE_CURRENT_SOURCE_DIR}/lib/tabulous.lua
|
SET(AWE_LUA_FILES
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/lib/awful.lua
|
${CMAKE_CURRENT_SOURCE_DIR}/lib/tabulous.lua
|
||||||
)
|
${CMAKE_CURRENT_SOURCE_DIR}/lib/awful.lua)
|
||||||
|
|
||||||
SET( AWE_CONF_FILES ${CMAKE_CURRENT_SOURCE_DIR}/awesomerc.lua
|
SET(AWE_CONF_FILES ${CMAKE_CURRENT_SOURCE_DIR}/awesomerc.lua)
|
||||||
)
|
|
||||||
|
|
||||||
SET( AWE_ICON_DIR ${CMAKE_CURRENT_SOURCE_DIR}/icons )
|
SET(AWE_ICON_DIR ${CMAKE_CURRENT_SOURCE_DIR}/icons)
|
||||||
|
|
||||||
SET( AWE_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/awesome.c
|
SET(AWE_SRCS
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/client.c
|
${CMAKE_CURRENT_SOURCE_DIR}/awesome.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/cnode.c
|
${CMAKE_CURRENT_SOURCE_DIR}/client.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/dbus.c
|
${CMAKE_CURRENT_SOURCE_DIR}/cnode.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/event.c
|
${CMAKE_CURRENT_SOURCE_DIR}/dbus.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/ewmh.c
|
${CMAKE_CURRENT_SOURCE_DIR}/event.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/focus.c
|
${CMAKE_CURRENT_SOURCE_DIR}/ewmh.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/keybinding.c
|
${CMAKE_CURRENT_SOURCE_DIR}/focus.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/keygrabber.c
|
${CMAKE_CURRENT_SOURCE_DIR}/keybinding.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/layout.c
|
${CMAKE_CURRENT_SOURCE_DIR}/keygrabber.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/lua.c
|
${CMAKE_CURRENT_SOURCE_DIR}/layout.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/mouse.c
|
${CMAKE_CURRENT_SOURCE_DIR}/lua.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/placement.c
|
${CMAKE_CURRENT_SOURCE_DIR}/mouse.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/screen.c
|
${CMAKE_CURRENT_SOURCE_DIR}/placement.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/stack.c
|
${CMAKE_CURRENT_SOURCE_DIR}/screen.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/statusbar.c
|
${CMAKE_CURRENT_SOURCE_DIR}/stack.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/systray.c
|
${CMAKE_CURRENT_SOURCE_DIR}/statusbar.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/tag.c
|
${CMAKE_CURRENT_SOURCE_DIR}/systray.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/titlebar.c
|
${CMAKE_CURRENT_SOURCE_DIR}/tag.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/widget.c
|
${CMAKE_CURRENT_SOURCE_DIR}/titlebar.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/window.c
|
${CMAKE_CURRENT_SOURCE_DIR}/widget.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/configopts.c
|
${CMAKE_CURRENT_SOURCE_DIR}/window.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/draw.c
|
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/configopts.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/markup.c
|
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/draw.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/socket.c
|
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/markup.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/swindow.c
|
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/socket.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/util.c
|
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/swindow.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/version.c
|
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/util.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/xembed.c
|
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/version.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/xscreen.c
|
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/xembed.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/xutil.c
|
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/xscreen.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_LAYOUT_DIR}/fibonacci.c
|
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/xutil.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_LAYOUT_DIR}/floating.c
|
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_LAYOUT_DIR}/fibonacci.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_LAYOUT_DIR}/magnifier.c
|
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_LAYOUT_DIR}/floating.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_LAYOUT_DIR}/max.c
|
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_LAYOUT_DIR}/magnifier.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_LAYOUT_DIR}/tile.c
|
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_LAYOUT_DIR}/max.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_WIDGET_DIR}/graph.c
|
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_LAYOUT_DIR}/tile.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_WIDGET_DIR}/iconbox.c
|
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_WIDGET_DIR}/graph.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_WIDGET_DIR}/progressbar.c
|
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_WIDGET_DIR}/iconbox.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_WIDGET_DIR}/taglist.c
|
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_WIDGET_DIR}/progressbar.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_WIDGET_DIR}/tasklist.c
|
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_WIDGET_DIR}/taglist.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_WIDGET_DIR}/textbox.c
|
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_WIDGET_DIR}/tasklist.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_WIDGET_DIR}/systray.c
|
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_WIDGET_DIR}/textbox.c
|
||||||
)
|
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_WIDGET_DIR}/systray.c)
|
||||||
|
|
||||||
SET( AWE_CLIENT_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/awesome-client.c
|
SET(AWE_CLIENT_SRCS
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/configopts.c
|
${CMAKE_CURRENT_SOURCE_DIR}/awesome-client.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/draw.c
|
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/configopts.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/markup.c
|
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/draw.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/socket.c
|
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/markup.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/swindow.c
|
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/socket.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/util.c
|
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/swindow.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/version.c
|
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/util.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/xscreen.c
|
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/version.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/xutil.c
|
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/xscreen.c
|
||||||
)
|
${CMAKE_CURRENT_SOURCE_DIR}/${AWE_COMMON_DIR}/xutil.c)
|
||||||
|
|
||||||
SET( AWE_MAN_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/awesome.1.txt
|
SET(AWE_MAN_SRCS
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/awesome-client.1.txt
|
${CMAKE_CURRENT_SOURCE_DIR}/awesome.1.txt
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/awesomerc.5.txt
|
${CMAKE_CURRENT_SOURCE_DIR}/awesome-client.1.txt
|
||||||
)
|
${CMAKE_CURRENT_SOURCE_DIR}/awesomerc.5.txt)
|
||||||
SET( AWE_MAN1_NAME ${CMAKE_CURRENT_BINARY_DIR}/awesome.1.gz
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/awesome-client.1.gz )
|
|
||||||
SET( AWE_MAN5_NAME ${CMAKE_CURRENT_BINARY_DIR}/awesomerc.5.gz )
|
|
||||||
|
|
||||||
SET( AWE_LUADOC_FILE ${CMAKE_CURRENT_SOURCE_DIR}/apidocgen.txt )
|
SET(AWE_MAN1_NAME
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/awesome.1.gz
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/awesome-client.1.gz)
|
||||||
|
|
||||||
|
SET(AWE_MAN5_NAME ${CMAKE_CURRENT_BINARY_DIR}/awesomerc.5.gz)
|
||||||
|
|
||||||
|
SET(AWE_LUADOC_FILE ${CMAKE_CURRENT_SOURCE_DIR}/apidocgen.txt)
|
||||||
|
|
||||||
|
|
||||||
ADD_EXECUTABLE( ${PROJECT_AWE_NAME} ${AWE_SRCS} )
|
ADD_EXECUTABLE(${PROJECT_AWE_NAME} ${AWE_SRCS})
|
||||||
ADD_EXECUTABLE( ${PROJECT_AWECLIENT_NAME} ${AWE_CLIENT_SRCS} )
|
ADD_EXECUTABLE(${PROJECT_AWECLIENT_NAME} ${AWE_CLIENT_SRCS})
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES( ${PROJECT_AWE_NAME} ${AWE_MOD_LIBRARIES}
|
TARGET_LINK_LIBRARIES(${PROJECT_AWE_NAME}
|
||||||
${LUA_LIB}
|
${AWE_MOD_LIBRARIES}
|
||||||
${LIB_EV}
|
${LUA_LIB}
|
||||||
${LIB_READLINE}
|
${LIB_EV}
|
||||||
${LIB_NCURSES}
|
${LIB_READLINE}
|
||||||
${LIB_EV}
|
${LIB_NCURSES}
|
||||||
)
|
${LIB_EV})
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES( ${PROJECT_AWECLIENT_NAME} ${AWE_MOD_LIBRARIES}
|
TARGET_LINK_LIBRARIES(${PROJECT_AWECLIENT_NAME}
|
||||||
${LIB_READLINE}
|
${AWE_MOD_LIBRARIES}
|
||||||
${LIB_NCURSES}
|
${LIB_READLINE}
|
||||||
)
|
${LIB_NCURSES})
|
||||||
|
|
||||||
IF( AWESOME_GENERATE_MAN )
|
IF(AWESOME_GENERATE_MAN)
|
||||||
# Create luadoc file
|
# Create luadoc file
|
||||||
FIND_PROGRAM( CAT_EXECUTABLE cat )
|
FIND_PROGRAM(CAT_EXECUTABLE cat)
|
||||||
EXECUTE_PROCESS( COMMAND ${CAT_EXECUTABLE} ${AWE_SRCS}
|
EXECUTE_PROCESS(COMMAND ${CAT_EXECUTABLE} ${AWE_SRCS}
|
||||||
COMMAND ${LUA_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/build-utils/gendoc.lua
|
COMMAND ${LUA_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/build-utils/gendoc.lua
|
||||||
OUTPUT_FILE ${AWE_LUADOC_FILE}
|
OUTPUT_FILE ${AWE_LUADOC_FILE}
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
FOREACH( txtfile ${AWE_MAN_SRCS})
|
|
||||||
STRING( REGEX REPLACE ".txt\$" ".xml" xmlfile ${txtfile} )
|
|
||||||
STRING( REGEX REPLACE ".xml\$" ".gz" gzipman ${xmlfile} )
|
|
||||||
STRING( REPLACE ${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR} gzipman ${gzipman} )
|
|
||||||
STRING( REGEX REPLACE ".gz\$" "" manfile ${gzipman} )
|
|
||||||
|
|
||||||
ADD_CUSTOM_COMMAND( TARGET ${PROJECT_AWECLIENT_NAME} POST_BUILD
|
FOREACH(txtfile ${AWE_MAN_SRCS})
|
||||||
COMMAND ${ASCIIDOC_EXECUTABLE} -d manpage -b docbook -o ${xmlfile} ${txtfile}
|
STRING(REGEX REPLACE ".txt\$" ".xml" xmlfile ${txtfile})
|
||||||
COMMAND ${XMLTO_EXECUTABLE} man ${xmlfile}
|
STRING(REGEX REPLACE ".xml\$" ".gz" gzipman ${xmlfile})
|
||||||
COMMAND ${GZIP_EXECUTABLE} -f ${manfile}
|
STRING(REPLACE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
COMMENT "Generating manpage for ${manfile}"
|
${CMAKE_CURRENT_BINARY_DIR} gzipman ${gzipman})
|
||||||
)
|
STRING(REGEX REPLACE ".gz\$" "" manfile ${gzipman})
|
||||||
ENDFOREACH( txtfile )
|
|
||||||
ENDIF( AWESOME_GENERATE_MAN )
|
|
||||||
|
|
||||||
INSTALL( TARGETS ${PROJECT_AWE_NAME} ${PROJECT_AWECLIENT_NAME}
|
|
||||||
RUNTIME DESTINATION bin
|
|
||||||
)
|
|
||||||
|
|
||||||
INSTALL( FILES ${AWE_LUA_FILES}
|
ADD_CUSTOM_COMMAND(TARGET ${PROJECT_AWECLIENT_NAME} POST_BUILD
|
||||||
DESTINATION ${AWESOME_LUA_LIB_PATH}
|
COMMAND ${ASCIIDOC_EXECUTABLE} -d manpage -b docbook -o ${xmlfile} ${txtfile}
|
||||||
)
|
COMMAND ${XMLTO_EXECUTABLE} man ${xmlfile}
|
||||||
|
COMMAND ${GZIP_EXECUTABLE} -f ${manfile}
|
||||||
|
COMMENT "Generating manpage for ${manfile}")
|
||||||
|
ENDFOREACH()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
INSTALL( FILES ${AWE_CONF_FILES}
|
INSTALL(TARGETS ${PROJECT_AWE_NAME} ${PROJECT_AWECLIENT_NAME} RUNTIME DESTINATION bin)
|
||||||
DESTINATION ${AWESOME_CONF_PATH}
|
INSTALL(FILES ${AWE_LUA_FILES} DESTINATION ${AWESOME_LUA_LIB_PATH})
|
||||||
)
|
INSTALL(FILES ${AWE_CONF_FILES} DESTINATION ${AWESOME_CONF_PATH})
|
||||||
|
INSTALL(FILES ${AWE_MAN1_NAME} DESTINATION ${AWESOME_MAN1_PATH})
|
||||||
INSTALL( FILES ${AWE_MAN1_NAME}
|
INSTALL(FILES ${AWE_MAN5_NAME} DESTINATION ${AWESOME_MAN5_PATH})
|
||||||
DESTINATION ${AWESOME_MAN1_PATH}
|
INSTALL(DIRECTORY ${AWE_ICON_DIR} DESTINATION ${AWESOME_DATA_PATH})
|
||||||
)
|
|
||||||
|
|
||||||
INSTALL( FILES ${AWE_MAN5_NAME}
|
|
||||||
DESTINATION ${AWESOME_MAN5_PATH}
|
|
||||||
)
|
|
||||||
|
|
||||||
INSTALL( DIRECTORY ${AWE_ICON_DIR}
|
|
||||||
DESTINATION ${AWESOME_DATA_PATH}
|
|
||||||
)
|
|
||||||
|
|
||||||
# vim: filetype=cmake:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
# vim: filetype=cmake:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||||
|
|
|
@ -1,194 +1,168 @@
|
||||||
SET( PROJECT_AWE_NAME awesome )
|
SET(PROJECT_AWE_NAME awesome)
|
||||||
SET( PROJECT_AWECLIENT_NAME awesome-client )
|
SET(PROJECT_AWECLIENT_NAME awesome-client)
|
||||||
SET( VERSION 3 )
|
SET(VERSION 3)
|
||||||
|
SET(VERSION_MAJOR ${VERSION})
|
||||||
|
SET(VERSION_MINOR 0)
|
||||||
|
SET(VERSION_PATCH 0)
|
||||||
|
|
||||||
SET( VERSION_MAJOR ${VERSION} )
|
PROJECT(${PROJECT_AWE_NAME})
|
||||||
SET( VERSION_MINOR 0 )
|
|
||||||
SET( VERSION_PATCH 0 )
|
|
||||||
|
|
||||||
PROJECT( ${PROJECT_AWE_NAME} )
|
SET(CMAKE_BUILD_TYPE RELEASE)
|
||||||
|
|
||||||
SET( CMAKE_BUILD_TYPE RELEASE )
|
|
||||||
|
|
||||||
# If this is a git repository...
|
# If this is a git repository...
|
||||||
IF( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git/HEAD )
|
IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git/HEAD)
|
||||||
# ...update version
|
# ...update version
|
||||||
FIND_PROGRAM(GIT_EXECUTABLE git)
|
FIND_PROGRAM(GIT_EXECUTABLE git)
|
||||||
IF( GIT_EXECUTABLE )
|
IF(GIT_EXECUTABLE)
|
||||||
EXECUTE_PROCESS( COMMAND ${GIT_EXECUTABLE} describe
|
EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} describe
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
OUTPUT_VARIABLE VERSION
|
OUTPUT_VARIABLE VERSION
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE )
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
ENDIF( GIT_EXECUTABLE )
|
ENDIF()
|
||||||
ENDIF( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git/HEAD )
|
ENDIF()
|
||||||
|
|
||||||
|
|
||||||
# Check for doxygen
|
# Check for doxygen
|
||||||
INCLUDE( FindDoxygen )
|
INCLUDE(FindDoxygen)
|
||||||
INCLUDE( FindPkgConfig )
|
INCLUDE(FindPkgConfig)
|
||||||
INCLUDE( UsePkgConfig )
|
INCLUDE(UsePkgConfig)
|
||||||
|
|
||||||
SET( AWE_COMMON_DIR common )
|
SET(AWE_COMMON_DIR common)
|
||||||
SET( AWE_LAYOUT_DIR layouts )
|
SET(AWE_LAYOUT_DIR layouts)
|
||||||
SET( AWE_WIDGET_DIR widgets )
|
SET(AWE_WIDGET_DIR widgets)
|
||||||
|
|
||||||
MESSAGE( "Checking for REQUIRED modules: " )
|
|
||||||
|
|
||||||
# Use pkgconfig to get most of the libraries
|
# Use pkgconfig to get most of the libraries
|
||||||
pkg_check_modules( AWE_MOD REQUIRED glib-2.0
|
pkg_check_modules(AWE_MOD REQUIRED
|
||||||
cairo
|
glib-2.0
|
||||||
pango
|
cairo
|
||||||
gdk-2.0>=2.2
|
pango
|
||||||
gdk-pixbuf-2.0>=2.2
|
gdk-2.0>=2.2
|
||||||
xcb
|
gdk-pixbuf-2.0>=2.2
|
||||||
xcb-event
|
xcb
|
||||||
xcb-randr
|
xcb-event
|
||||||
xcb-xinerama
|
xcb-randr
|
||||||
xcb-shape
|
xcb-xinerama
|
||||||
xcb-aux
|
xcb-shape
|
||||||
xcb-atom
|
xcb-aux
|
||||||
xcb-keysyms
|
xcb-atom
|
||||||
xcb-render
|
xcb-keysyms
|
||||||
xcb-icccm
|
xcb-render
|
||||||
cairo-xcb
|
xcb-icccm
|
||||||
dbus-1
|
cairo-xcb
|
||||||
imlib2
|
dbus-1
|
||||||
)
|
imlib2)
|
||||||
|
|
||||||
# Check for readline and ncurse
|
# Check for readline and ncurse
|
||||||
FIND_LIBRARY( LIB_READLINE readline )
|
FIND_LIBRARY(LIB_READLINE readline)
|
||||||
FIND_LIBRARY( LIB_NCURSES ncurses )
|
FIND_LIBRARY(LIB_NCURSES ncurses)
|
||||||
FIND_LIBRARY( LIB_EV ev )
|
FIND_LIBRARY(LIB_EV ev)
|
||||||
|
|
||||||
# Check for lobev
|
|
||||||
FIND_LIBRARY( LIB_EV ev )
|
|
||||||
|
|
||||||
# Check for lua5.1
|
# Check for lua5.1
|
||||||
FIND_PATH(LUA_INC_DIR lua.h
|
FIND_PATH(LUA_INC_DIR lua.h
|
||||||
/usr/include
|
/usr/include
|
||||||
/usr/include/lua5.1
|
/usr/include/lua5.1
|
||||||
/usr/local/include/lua5.1
|
/usr/local/include/lua5.1)
|
||||||
../libs/lua-5.1.3/src)
|
|
||||||
|
|
||||||
FIND_LIBRARY(LUA_LIB NAMES lua5.1 lua
|
FIND_LIBRARY(LUA_LIB NAMES lua5.1 lua
|
||||||
/usr/lib
|
/usr/lib
|
||||||
/usr/lib/lua
|
/usr/lib/lua
|
||||||
/usr/local/lib
|
/usr/local/lib)
|
||||||
../libs/lua-5.1.3/lib)
|
|
||||||
|
|
||||||
FIND_PROGRAM( LUA_EXECUTABLE lua )
|
FIND_PROGRAM(LUA_EXECUTABLE lua)
|
||||||
|
|
||||||
# Error check
|
# Error check
|
||||||
IF( NOT LIB_EV )
|
IF(NOT LIB_EV)
|
||||||
MESSAGE( FATAL_ERROR "ev library not found" )
|
MESSAGE( FATAL_ERROR "ev library not found")
|
||||||
ENDIF( NOT LIB_EV )
|
ENDIF()
|
||||||
|
|
||||||
IF( NOT LIB_READLINE )
|
IF(NOT LIB_READLINE)
|
||||||
MESSAGE( FATAL_ERROR "readline library not found" )
|
MESSAGE(FATAL_ERROR "readline library not found")
|
||||||
ENDIF( NOT LIB_READLINE )
|
ENDIF()
|
||||||
|
|
||||||
IF( NOT LIB_NCURSES )
|
IF(NOT LIB_NCURSES)
|
||||||
MESSAGE( FATAL_ERROR "ncurse library not found" )
|
MESSAGE(FATAL_ERROR "ncurse library not found")
|
||||||
ENDIF( NOT LIB_NCURSES )
|
ENDIF()
|
||||||
|
|
||||||
IF( NOT LIB_EV )
|
IF(NOT LUA_LIB)
|
||||||
MESSAGE( FATAL_ERROR "libev not found" )
|
MESSAGE(FATAL_ERROR "lua library not found")
|
||||||
ENDIF( NOT LIB_EV )
|
ENDIF()
|
||||||
|
|
||||||
IF( NOT LUA_LIB )
|
|
||||||
MESSAGE( FATAL_ERROR "lua library not found" )
|
|
||||||
ELSE( LUA_LIB AND LUA_INC_DIR )
|
|
||||||
MESSAGE( "lua 5.1 found: " ${LUA_LIB} )
|
|
||||||
ENDIF( NOT LUA_LIB )
|
|
||||||
|
|
||||||
# Add awesome defines
|
# Add awesome defines
|
||||||
ADD_DEFINITIONS( -DWITH_DBUS
|
ADD_DEFINITIONS(-DWITH_DBUS -DWITH_IMLIB)
|
||||||
-DWITH_IMLIB
|
|
||||||
)
|
|
||||||
|
|
||||||
IF ( DOXYGEN_EXECUTABLE )
|
IF(DOXYGEN_EXECUTABLE)
|
||||||
ADD_CUSTOM_TARGET( doc ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/awesome.doxygen )
|
ADD_CUSTOM_TARGET(doc ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/awesome.doxygen)
|
||||||
ENDIF ( DOXYGEN_EXECUTABLE )
|
ENDIF()
|
||||||
|
|
||||||
# Check for programs needed for man pages
|
# Check for programs needed for man pages
|
||||||
FIND_PROGRAM( ASCIIDOC_EXECUTABLE asciidoc )
|
FIND_PROGRAM(ASCIIDOC_EXECUTABLE asciidoc)
|
||||||
FIND_PROGRAM( XMLTO_EXECUTABLE xmlto )
|
FIND_PROGRAM(XMLTO_EXECUTABLE xmlto)
|
||||||
FIND_PROGRAM( GZIP_EXECUTABLE gzip )
|
FIND_PROGRAM(GZIP_EXECUTABLE gzip)
|
||||||
|
|
||||||
IF( ASCIIDOC_EXECUTABLE AND XMLTO_EXECUTABLE AND GZIP_EXECUTABLE )
|
IF(ASCIIDOC_EXECUTABLE AND XMLTO_EXECUTABLE AND GZIP_EXECUTABLE)
|
||||||
SET( AWESOME_GENERATE_MAN TRUE )
|
SET(AWESOME_GENERATE_MAN TRUE)
|
||||||
ENDIF( ASCIIDOC_EXECUTABLE AND XMLTO_EXECUTABLE AND GZIP_EXECUTABLE )
|
ENDIF()
|
||||||
|
|
||||||
# Set awesome informations and path
|
# Set awesome informations and path
|
||||||
SET( AWESOME_VERSION_INTERNAL devel )
|
SET(AWESOME_VERSION_INTERNAL devel )
|
||||||
SET( AWESOME_COMPILE_MACHINE ${CMAKE_SYSTEM_PROCESSOR} )
|
SET(AWESOME_COMPILE_MACHINE ${CMAKE_SYSTEM_PROCESSOR} )
|
||||||
SET( AWESOME_COMPILE_HOSTNAME $ENV{HOSTNAME} )
|
SET(AWESOME_COMPILE_HOSTNAME $ENV{HOSTNAME} )
|
||||||
SET( AWESOME_COMPILE_BY $ENV{USER} )
|
SET(AWESOME_COMPILE_BY $ENV{USER} )
|
||||||
SET( AWESOME_RELEASE ${VERSION} )
|
SET(AWESOME_RELEASE ${VERSION} )
|
||||||
SET( AWESOME_ETC etc )
|
SET(AWESOME_ETC etc )
|
||||||
SET( AWESOME_SHARE share )
|
SET(AWESOME_SHARE share )
|
||||||
SET( AWESOME_DATA_PATH ${AWESOME_SHARE}/${PROJECT_AWE_NAME} )
|
SET(AWESOME_DATA_PATH ${AWESOME_SHARE}/${PROJECT_AWE_NAME} )
|
||||||
SET( AWESOME_LUA_LIB_PATH ${AWESOME_SHARE}/${PROJECT_AWE_NAME}/lib )
|
SET(AWESOME_LUA_LIB_PATH ${AWESOME_SHARE}/${PROJECT_AWE_NAME}/lib )
|
||||||
SET( AWESOME_ICON_PATH ${AWESOME_SHARE}/${PROJECT_AWE_NAME}/icons )
|
SET(AWESOME_ICON_PATH ${AWESOME_SHARE}/${PROJECT_AWE_NAME}/icons )
|
||||||
SET( AWESOME_CONF_PATH ${AWESOME_ETC}/${PROJECT_AWE_NAME} )
|
SET(AWESOME_CONF_PATH ${AWESOME_ETC}/${PROJECT_AWE_NAME} )
|
||||||
SET( AWESOME_MAN1_PATH ${AWESOME_SHARE}/man/man1 )
|
SET(AWESOME_MAN1_PATH ${AWESOME_SHARE}/man/man1 )
|
||||||
SET( AWESOME_MAN5_PATH ${AWESOME_SHARE}/man/man5 )
|
SET(AWESOME_MAN5_PATH ${AWESOME_SHARE}/man/man5 )
|
||||||
|
|
||||||
# Configure awesome config.h from template
|
# Configure awesome config.h from template
|
||||||
CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/config.h.in
|
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/config.h
|
${CMAKE_CURRENT_SOURCE_DIR}/config.h
|
||||||
ESCAPE_QUOTE
|
ESCAPE_QUOTE
|
||||||
@ONLY
|
@ONLY)
|
||||||
)
|
|
||||||
|
|
||||||
# Confiure awesomerc.lua.in
|
# Confiure awesomerc.lua.in
|
||||||
CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/awesomerc.lua.in
|
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/awesomerc.lua.in
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/awesomerc.lua
|
${CMAKE_CURRENT_SOURCE_DIR}/awesomerc.lua
|
||||||
ESCAPE_QUOTE
|
ESCAPE_QUOTE
|
||||||
@ONLY
|
@ONLY)
|
||||||
)
|
|
||||||
|
|
||||||
# Configure awesome awesome-version-internal.h from template
|
# Configure awesome awesome-version-internal.h from template
|
||||||
CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/awesome-version-internal.h.in
|
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/awesome-version-internal.h.in
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/awesome-version-internal.h
|
${CMAKE_CURRENT_SOURCE_DIR}/awesome-version-internal.h
|
||||||
ESCAPE_QUOTE
|
ESCAPE_QUOTE
|
||||||
@ONLY
|
@ONLY)
|
||||||
)
|
|
||||||
|
|
||||||
# Configure awesome.doxygen
|
# Configure awesome.doxygen
|
||||||
CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/awesome.doxygen.in
|
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/awesome.doxygen.in
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/awesome.doxygen
|
${CMAKE_CURRENT_SOURCE_DIR}/awesome.doxygen
|
||||||
ESCAPE_QUOTE
|
ESCAPE_QUOTE
|
||||||
@ONLY
|
@ONLY)
|
||||||
)
|
|
||||||
|
|
||||||
# Execute some header generator
|
# Execute some header generator
|
||||||
EXECUTE_PROCESS( COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/build-utils/layoutgen.sh
|
EXECUTE_PROCESS(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/build-utils/layoutgen.sh
|
||||||
OUTPUT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/layoutgen.h
|
OUTPUT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/layoutgen.h
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
)
|
|
||||||
|
|
||||||
EXECUTE_PROCESS( COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/build-utils/widgetgen.sh
|
EXECUTE_PROCESS(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/build-utils/widgetgen.sh
|
||||||
OUTPUT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/widgetgen.h
|
OUTPUT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/widgetgen.h
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
)
|
|
||||||
|
|
||||||
# Set the awesome include dir
|
# Set the awesome include dir
|
||||||
SET( AWE_INC_DIR ${CMAKE_CURRENT_SOURCE_DIR}
|
SET(AWE_INC_DIR ${CMAKE_CURRENT_SOURCE_DIR} ${AWE_MOD_INCLUDE_DIRS} ${LUA_INC_DIR})
|
||||||
${AWE_MOD_INCLUDE_DIRS}
|
|
||||||
${LUA_INC_DIR}
|
|
||||||
)
|
|
||||||
|
|
||||||
SET( CPACK_PACKAGE_NAME "${PROJECT_AWE_NAME}" )
|
SET(CPACK_PACKAGE_NAME "${PROJECT_AWE_NAME}" )
|
||||||
SET( CPACK_GENERATOR "TBZ2" )
|
SET(CPACK_GENERATOR "TBZ2" )
|
||||||
SET( CPACK_PACKAGE_DESCRIPTION_SUMMARY "A fast tiling WM" )
|
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A dynamic floating and tiling window manager" )
|
||||||
SET( CPACK_PACKAGE_VENDOR "Awesome's team" )
|
SET(CPACK_PACKAGE_VENDOR "awesome development team" )
|
||||||
SET( CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README" )
|
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README" )
|
||||||
SET( CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE" )
|
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE" )
|
||||||
SET( CPACK_PACKAGE_VERSION_MAJOR "${VERSION_MAJOR}" )
|
SET(CPACK_PACKAGE_VERSION_MAJOR "${VERSION_MAJOR}" )
|
||||||
SET( CPACK_PACKAGE_VERSION_MINOR "${VERSION_MINOR}" )
|
SET(CPACK_PACKAGE_VERSION_MINOR "${VERSION_MINOR}" )
|
||||||
SET( CPACK_PACKAGE_VERSION_PATCH "${VERSION_PATCH}" )
|
SET(CPACK_PACKAGE_VERSION_PATCH "${VERSION_PATCH}" )
|
||||||
|
|
||||||
INCLUDE( CPack )
|
INCLUDE(CPack)
|
||||||
|
|
||||||
# vim: filetype=cmake:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
# vim: filetype=cmake:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||||
|
|
Loading…
Reference in New Issue