diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/chmlib/CMakeLists.txt | |
Diffstat (limited to 'vcpkg/ports/chmlib/CMakeLists.txt')
| -rw-r--r-- | vcpkg/ports/chmlib/CMakeLists.txt | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/vcpkg/ports/chmlib/CMakeLists.txt b/vcpkg/ports/chmlib/CMakeLists.txt new file mode 100644 index 0000000..296ed6a --- /dev/null +++ b/vcpkg/ports/chmlib/CMakeLists.txt @@ -0,0 +1,29 @@ +cmake_minimum_required(VERSION 3.5)
+project(chm C)
+
+include (CheckIncludeFiles)
+check_include_files(strings.h HAVE_STRINGS_H) # for ffs
+
+add_library(chm src/lzx.c src/chm_lib.c)
+if(HAVE_STRINGS_H)
+ target_compile_definitions(chm PRIVATE CHMLIB_HAVE_STRINGS_H)
+endif()
+
+if(BUILD_TOOLS)
+ link_libraries(chm)
+ add_executable(enum_chmLib src/enum_chmLib.c)
+ add_executable(enumdir_chmLib src/enumdir_chmLib.c)
+ add_executable(extract_chmLib src/extract_chmLib.c)
+
+ install(TARGETS enum_chmLib extract_chmLib enumdir_chmLib
+ RUNTIME DESTINATION tools/chmlib
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+ )
+endif()
+
+install(TARGETS chm
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
|