From d1a8285f818eb7e5c3d6a05709ea21a808490b8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 19 Mar 2018 19:55:58 +0100 Subject: New upstream version 5.1.0 --- app/lib/CMakeLists.txt | 54 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 41 insertions(+), 13 deletions(-) (limited to 'app/lib/CMakeLists.txt') 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 -- cgit v1.2.3