forked from Stellarium/stellarium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
35 lines (26 loc) · 1.19 KB
/
CMakeLists.txt
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
# to generate manual page:
# pod2man --section=1 -r ${VERSION} --center=" " stellarium.pod stellarium.1
IF(UNIX AND NOT WIN32)
ADD_CUSTOM_TARGET(ManPages ALL)
CONFIGURE_FILE(
${PROJECT_SOURCE_DIR}/cmake/stellarium.pod.cmake
${CMAKE_CURRENT_BINARY_DIR}/stellarium.pod
)
ADD_CUSTOM_COMMAND(
TARGET ManPages
SOURCE ${CMAKE_CURRENT_BINARY_DIR}/stellarium.pod
COMMAND pod2man
ARGS -s 1 -r ${VERSION} -center=" " ${CMAKE_CURRENT_BINARY_DIR}/stellarium.pod ${CMAKE_CURRENT_BINARY_DIR}/stellarium.1
OUTPUTS ${CMAKE_CURRENT_BINARY_DIR}/stellarium.1
)
ADD_CUSTOM_COMMAND(
TARGET ManPages
SOURCE ManPages
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/stellarium.1
)
IF(${CMAKE_SYSTEM_NAME} MATCHES "(DragonFly|FreeBSD|NetBSD|OpenBSD)" AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "kFreeBSD")
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/stellarium.1 DESTINATION man/man1)
ELSE(${CMAKE_SYSTEM_NAME} MATCHES "(DragonFly|FreeBSD|NetBSD|OpenBSD)" AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "kFreeBSD")
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/stellarium.1 DESTINATION share/man/man1)
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "(DragonFly|FreeBSD|NetBSD|OpenBSD)" AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "kFreeBSD")
ENDIF(UNIX AND NOT WIN32)