-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
34 lines (25 loc) · 976 Bytes
/
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
34
# nanabozo:CMakeLists.txt
# This file should in fact only be used on Weirdoze.
cmake_minimum_required( VERSION 3.10 )
project( nanabozo )
set( INPUTSIZE 512 CACHE STRING "Maximum line length." )
add_definitions( -DINPUTSIZE=${INPUTSIZE} )
if ( WIN32 )
add_definitions( -D_CRT_SECURE_NO_WARNINGS )
else()
add_definitions( -Wall -Wextra -O3 )
endif()
add_executable( nanabozo nanabozo.c )
install( TARGETS nanabozo RUNTIME DESTINATION bin )
# man page
if ( NOT WIN32 )
add_custom_command(
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/nanabozo.1
COMMAND gzip ARGS -c ${CMAKE_CURRENT_SOURCE_DIR}/nanabozo.1 > ${CMAKE_CURRENT_BINARY_DIR}/nanabozo.1.gz
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/nanabozo.1.gz )
add_custom_target( manpage ALL
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/nanabozo.1.gz )
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/nanabozo.1.gz
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1 )
endif()
# vi: fenc=utf-8 ff=unix et ai sw=2 ts=2 sts=2