diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-03-19 19:55:58 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-03-19 19:55:58 +0100 |
commit | d1a8285f818eb7e5c3d6a05709ea21a808490b8c (patch) | |
tree | 326578f0505cbed07cfe60de530022822dc237ac /app/lib/CMakeLists.txt | |
parent | 16e9630b79f0a7a90c6cedb6781175bb8b337dc1 (diff) |
New upstream version 5.1.0upstream/5.1.0
Diffstat (limited to 'app/lib/CMakeLists.txt')
-rw-r--r-- | app/lib/CMakeLists.txt | 54 |
1 files changed, 41 insertions, 13 deletions
diff --git a/app/lib/CMakeLists.txt b/app/lib/CMakeLists.txt index 3de124e..a2e823d 100644 --- a/app/lib/CMakeLists.txt +++ b/app/lib/CMakeLists.txt @@ -1,28 +1,56 @@ - -# $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/lib/CMakeLists.txt,v 1.6 2008-03-27 18:17:16 m_fischer Exp $ +# CMakeList for the LIB directory # +# Include the subdirectories for params, examples and params +# Generate and install a Readme.txt file from markdown if pandoc is available on the system +# install desktop integration following freedesktop.org specification +# +project(lib) -PROJECT(lib) - -ADD_SUBDIRECTORY(demos) -ADD_SUBDIRECTORY(examples) -ADD_SUBDIRECTORY(params) +add_subdirectory(demos) +add_subdirectory(examples) +add_subdirectory(params) -INSTALL(FILES +install(FILES COPYING - Readme.txt logo.bmp xtrkcad.xtq DESTINATION ${XTRKCAD_SHARE_INSTALL_DIR} ) + +set( infile "${CMAKE_CURRENT_SOURCE_DIR}/Readme.md" ) +set( outfile "${CMAKE_CURRENT_BINARY_DIR}/Readme.txt" ) +set( changelogin "${CMAKE_CURRENT_SOURCE_DIR}/CHANGELOG.md" ) +set( changelogout "${CMAKE_CURRENT_BINARY_DIR}/CHANGELOG.txt" ) -IF(UNIX AND NOT APPLE) - INSTALL(FILES +if(PANDOC_FOUND) + add_custom_command(OUTPUT "${outfile}" + COMMAND ${PANDOC_EXECUTABLE} "--from=Markdown" "--to=plain" "-o" ${outfile} ${infile} + DEPENDS "${infile}" + ) + add_custom_target(CHANGELOG ALL DEPENDS ${changelogout}) + add_custom_command(OUTPUT "${changelogout}" + COMMAND ${PANDOC_EXECUTABLE} "--from=Markdown" "--to=plain" "-o" ${changelogout} ${changelogin} + DEPENDS "${changelogin}" + ) + add_custom_target(Readme ALL DEPENDS ${outfile}) + install(FILES ${outfile} ${changelogout} + DESTINATION ${XTRKCAD_SHARE_INSTALL_DIR} + ) +else() + message(STATUS "Pandoc is not available on this system, Readme.txt is not generated!") +endif() + +if(UNIX AND NOT APPLE) + install(PROGRAMS + xdg-open + DESTINATION ${XTRKCAD_SHARE_INSTALL_DIR} + ) + install(FILES xtrkcad.desktop DESTINATION "/usr/share/applications" ) - INSTALL(FILES + install(FILES xtrkcad.png DESTINATION "/usr/share/pixmaps" ) -ENDIF(UNIX AND NOT APPLE)
\ No newline at end of file +endif()
\ No newline at end of file |