source: subversion/applications/share/map-icons/CMakeLists.txt @ 27763

Last change on this file since 27763 was 11689, checked in by joerg, 11 years ago

map-icons:replace singe shell calls with cmake mechanism(at least first part),opdate changelog,add new package nickw

  • Property svn:eol-style set to native
File size: 1.5 KB
RevLine 
[11603]1cmake_minimum_required(VERSION 2.6)
2
[11685]3PROJECT(map-icons)
[1890]4
[11685]5AUX_SOURCE_DIRECTORY(${CMAKE_SOURCE_DIR} ALL_SRC)
6message(STATUS "ALL_SRC: ${ALL_SRC}")
[1890]7
8
[11685]9# Find Compile Command
10FIND_PACKAGE(Perl REQUIRED)
11FIND_PROGRAM(COMPILE_EXECUTABLE
12  NAMES compile_icons.pl
[11689]13  PATHS tools ${CMAKE_SOURCE_DIR}/tools
[11685]14  )
15message(STATUS "Compile Command: ${COMPILE_EXECUTABLE}")
[1890]16
[11685]17# ---------------------- Set Variables
18IF (NOT APPLICATION_NAME)
19  MESSAGE(STATUS "${PROJECT_NAME} is used as APPLICATION_NAME")
20  SET(APPLICATION_NAME ${PROJECT_NAME})
21ENDIF (NOT APPLICATION_NAME)
[3465]22
[11685]23message(STATUS "CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX}")
24
25SET(SHARE_INSTALL_PREFIX
26  "${CMAKE_INSTALL_PREFIX}/share"
27  CACHE PATH "Base directory for files which go to share/"
28  FORCE
29  )
30
31SET(ICON_INSTALL_DIR
32  "${SHARE_INSTALL_PREFIX}/icons/map-icons"
33  CACHE PATH "The icon install dir (default data/map-icons/)"
34  FORCE
35  )
36
37# ---------------------- README
38configure_file(README ${CMAKE_CURRENT_BINARY_DIR}/README COPYONLY)
39configure_file(README.icons ${CMAKE_CURRENT_BINARY_DIR}/README.icons COPYONLY)
40install(
41  FILES
42    ${CMAKE_CURRENT_BINARY_DIR}/README
43  DESTINATION
44    ${ICON_INSTALL_DIR}
45)
46install(
47  FILES
48    ${CMAKE_CURRENT_BINARY_DIR}/README.icons
49  DESTINATION
50    ${ICON_INSTALL_DIR}
51)
52
53# ---------------------- compile-build
54ADD_CUSTOM_TARGET(all
[11689]55  COMMAND ${PERL_EXECUTABLE} ${COMPILE_EXECUTABLE} --src-dir=${CMAKE_SOURCE_DIR} --dst-dir=${CMAKE_CURRENT_BINARY_DIR}
[11685]56  COMMENT "compile Map-Icons"
57  VERBATIM
58  )
Note: See TracBrowser for help on using the repository browser.