From 3458794791693762de038e3b84a443a31ef27fb8 Mon Sep 17 00:00:00 2001 From: atxr Date: Tue, 6 Feb 2024 16:17:30 +0100 Subject: [PATCH] Fix CMake issues --- CMakeLists.txt | 1 - libmineziper/CMakeLists.txt | 11 ++++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 62b2645..c0e80b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,6 @@ project(mineziper LANGUAGES C VERSION 1.0.0) # Opions option(BUILD_TESTS "Build test programs" OFF) -#option(INSTALL_TTDDLL "Try to find and install ttd dll from Windbg Preview install folder" OFF) # Config set_property(GLOBAL PROPERTY USE_FOLDERS ON) diff --git a/libmineziper/CMakeLists.txt b/libmineziper/CMakeLists.txt index fd7dc47..1f0812c 100644 --- a/libmineziper/CMakeLists.txt +++ b/libmineziper/CMakeLists.txt @@ -4,10 +4,12 @@ set(libmineziper_STATIC_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/include) # mineziper sources set(libmineziper_SRC ${libmineziper_STATIC_SRC}/libmineziper.c + ${libmineziper_STATIC_SRC}/libmineziper_zip.c ) set(libmineziper_INCLUDE ${libmineziper_STATIC_INCLUDE}/libmineziper.h + ${libmineziper_STATIC_INCLUDE}/libmineziper_zip.h ) # Create static library @@ -17,4 +19,11 @@ add_library(libmineziper STATIC ${libmineziper_SRC} ${libmineziper_INCLUDE}) target_include_directories( libmineziper PUBLIC $ $ -) \ No newline at end of file +) + +install(TARGETS libmineziper EXPORT mineziper LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) +install(DIRECTORY ${libmineziper_SRC_PATH}/include DESTINATION include FILES_MATCHING PATTERN "*.h*") + +include(GNUInstallDirs) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/mineziper.pc DESTINATION lib/pkgconfig) +install(EXPORT mineziper DESTINATION cmake) \ No newline at end of file