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
|
cmake_minimum_required(VERSION 3.7...3.28)
project(halibut LANGUAGES C)
set(LIBCHARSET_LIBRARY_ONLY ON)
include_directories(charset ${CMAKE_CURRENT_BINARY_DIR}/charset)
add_subdirectory(charset)
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
endif()
add_executable(halibut
biblio.c
bk_html.c
bk_info.c
bk_man.c
bk_paper.c
bk_pdf.c
bk_ps.c
bk_text.c
bk_whlp.c
contents.c
deflate.c
error.c
help.c
huffman.c
in_afm.c
in_pf.c
in_sfnt.c
index.c
input.c
keywords.c
licence.c
lz77.c
lzx.c
main.c
malloc.c
misc.c
psdata.c
tree234.c
ustring.c
version.c
wcwidth.c
winchm.c
winhelp.c)
target_link_libraries(halibut charset)
if(CMAKE_VERSION VERSION_LESS 3.14)
# CMake 3.13 and earlier required an explicit install destination.
install(TARGETS halibut RUNTIME DESTINATION bin)
else()
# 3.14 and above selects a sensible default, which we should avoid
# overriding here so that end users can override it using
# CMAKE_INSTALL_BINDIR.
install(TARGETS halibut)
endif()
add_subdirectory(doc)
|