blob: c25c149ce7303ffd6501b21870582cc93ac276f5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
# 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)
add_subdirectory(params)
install(FILES
COPYING
logo.bmp
xtrkcad.xtq
xtrkcad.upd
DESTINATION ${XTRKCAD_SHARE_INSTALL_DIR}
)
# install parameter files
install(DIRECTORY params
DESTINATION ${XTRKCAD_SHARE_INSTALL_DIR}
FILES_MATCHING
PATTERN "*.xtp")
# install demos
install(DIRECTORY demos
DESTINATION ${XTRKCAD_SHARE_INSTALL_DIR}
FILES_MATCHING
PATTERN "*.xtr")
# install example layouts
install(DIRECTORY examples
DESTINATION ${XTRKCAD_SHARE_INSTALL_DIR}
FILES_MATCHING
PATTERN "*.xtc")
# install release documentation Readme and CHANGELOG
# depends on pandoc
#
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(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 and CHANGELOG.txt are not generated!")
endif()
if(UNIX AND NOT APPLE)
install(PROGRAMS
xdg-open xtrkcad-setup
DESTINATION ${XTRKCAD_SHARE_INSTALL_DIR}
)
install(FILES
xtrkcad${XTRKCAD_BETA}.desktop
DESTINATION "${XTRKCAD_SHARE_INSTALL_DIR}/applications"
RENAME xtrkcad.desktop
)
install(FILES
xtrkcad.xml
DESTINATION "${XTRKCAD_SHARE_INSTALL_DIR}/applications"
)
install(FILES
xtrkcad.png
DESTINATION "${XTRKCAD_SHARE_INSTALL_DIR}/pixmaps"
)
endif()
|