1 --- a/CMakeLists.txt 2022-11-28 06:34:39.171209779 -0800
2 +++ b/CMakeLists.txt 2022-11-28 06:33:13.368239757 -0800
4 project(lzo VERSION 2.10 LANGUAGES C)
6 # configuration options
7 -option(ENABLE_STATIC "Build static LZO library." ON)
8 -option(ENABLE_SHARED "Build shared LZO library." OFF)
9 +option(ENABLE_STATIC "Build static LZO library." ON)
10 +option(ENABLE_SHARED "Build shared LZO library." OFF)
11 +option(ENABLE_TESTS "Build tests." ON)
12 +option(ENABLE_EXAMPLES "Build examples." ON)
13 +option(ENABLE_DOCS "Install documentation." ON)
14 if(NOT ENABLE_STATIC AND NOT ENABLE_SHARED)
21 +if(ENABLE_TESTS OR ENABLE_EXAMPLES)
22 lzo_add_executable(lzotest lzotest/lzotest.c)
26 lzo_add_executable(dict examples/dict.c)
27 lzo_add_executable(lzopack examples/lzopack.c)
28 lzo_add_executable(overlap examples/overlap.c)
29 lzo_add_executable(precomp examples/precomp.c)
30 lzo_add_executable(precomp2 examples/precomp2.c)
32 +if(ENABLE_TESTS OR ENABLE_EXAMPLES)
33 lzo_add_executable(simple examples/simple.c)
35 # some boring internal test programs
37 lzo_add_executable(align tests/align.c)
44 add_executable(testmini minilzo/testmini.c minilzo/minilzo.c)
45 target_include_directories(testmini PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/include/lzo") # needed for "lzoconf.h"
49 if(DEFINED CMAKE_INSTALL_FULL_LIBDIR)
51 -set(f AUTHORS COPYING NEWS THANKS doc/LZO.FAQ doc/LZO.TXT doc/LZOAPI.TXT)
52 -install(FILES ${f} DESTINATION "${CMAKE_INSTALL_FULL_DOCDIR}")
54 + set(f AUTHORS COPYING NEWS THANKS doc/LZO.FAQ doc/LZO.TXT doc/LZOAPI.TXT)
55 + install(FILES ${f} DESTINATION "${CMAKE_INSTALL_FULL_DOCDIR}")
58 set(f include/lzo/lzo1.h include/lzo/lzo1a.h include/lzo/lzo1b.h
59 include/lzo/lzo1c.h include/lzo/lzo1f.h include/lzo/lzo1x.h
66 set(f lzopack lzotest simple testmini) # examples
67 install(TARGETS ${f} DESTINATION "${CMAKE_INSTALL_FULL_LIBEXECDIR}/lzo/examples")