From: Guido Draheim Date: Sat, 15 Sep 2018 12:14:27 +0000 (+0200) Subject: actually do install libzzipwrap, and move options to topdir X-Git-Tag: v0.13.72~97 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d84a5c73f689502102224ecf1449c9b74fd9bb56;p=zziplib actually do install libzzipwrap, and move options to topdir --- diff --git a/CMakeLists.txt b/CMakeLists.txt index c9287ef..ee7f4e1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,18 @@ MESSAGE(STATUS "VERSION ${VERSION} -> FIXNUM ${FIXNUM}") include ( GNUInstallDirs ) +option(BUILD_SHARED_LIBS "Build a shared library" ON) +option(BUILD_STATIC_LIBS "Build the static library" OFF) +option(BUILD_TESTS "Build test programs" OFF) +option(MSVC_STATIC_RUNTIME "Build with static runtime libs (/MT)" ON) +option(ZZIPMMAPPED "Build libzzipmmapped (not fully portable)" ON) +option(ZZIPFSEEKO "Build libzzipfseeko (based on posix.1 api)" ON) +option(ZZIPWRAP "Build libzzipwrap (non-installed example)" ON) +option(ZZIPSDL "Build zzcatsdl (includable example code)" ON) +option(ZZIPBINS "Build bins/unzzip (unzip-like executables)" ON) +option(ZZIPTEST "Build test/zzipself (self-extract example)" ON) +option(ZZIPDOCS "Build docs/manpages (and website content)" ON) + add_subdirectory(zzip) if(ZZIPWRAP) diff --git a/zzip/CMakeLists.txt b/zzip/CMakeLists.txt index 063c469..61b76fa 100644 --- a/zzip/CMakeLists.txt +++ b/zzip/CMakeLists.txt @@ -23,15 +23,9 @@ include ( GNUInstallDirs ) # options ########################################################### option(BUILD_SHARED_LIBS "Build a shared library" ON) option(BUILD_STATIC_LIBS "Build the static library" OFF) -option(BUILD_TESTS "Build test programs" OFF) option(MSVC_STATIC_RUNTIME "Build with static runtime libs (/MT)" ON) option(ZZIPMMAPPED "Build libzzipmmapped (not fully portable)" ON) option(ZZIPFSEEKO "Build libzzipfseeko (based on posix.1 api)" ON) -option(ZZIPWRAP "Build libzzipwrap (non-installed example)" ON) -option(ZZIPSDL "Build zzcatsdl (includable example code)" ON) -option(ZZIPBINS "Build bins/unzzip (unzip-like executables)" ON) -option(ZZIPTEST "Build test/zzipself (self-extract example)" ON) -option(ZZIPDOCS "Build docs/manpages (and website content)" ON) check_include_files ( byteswap.h ZZIP_HAVE_BYTESWAP_H ) check_include_files ( direct.h ZZIP_HAVE_DIRECT_H ) diff --git a/zzipwrap/CMakeLists.txt b/zzipwrap/CMakeLists.txt index 97810ee..4f7ae6e 100644 --- a/zzipwrap/CMakeLists.txt +++ b/zzipwrap/CMakeLists.txt @@ -27,24 +27,27 @@ find_package ( ZLIB REQUIRED ) pkg_search_module ( ZZIP zzip ) # targets ######################################################## -set(ZZIPWRAP_SRCS +set(zzipwrap_SRCS zzipwrap.c) -set(LIBZZIPWRAP_SRCS +set(libzzipwrap_SRCS wrap.c) -set(LIBZZIPWRAP_HDRS +set(libzzipwrap_HDRS wrap.h) -add_library(libzzipwrap ${LIBZZIPWRAP_SRCS} ) +add_library(libzzipwrap ${libzzipwrap_SRCS} ) target_link_libraries(libzzipwrap libzzip ZLIB::ZLIB ) target_include_directories (libzzipwrap PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${ZZIP_INCLUDE_DIR}) set_target_properties(libzzipwrap PROPERTIES OUTPUT_NAME "zzipwrap-${RELNUM}") SET_TARGET_PROPERTIES(libzzipwrap PROPERTIES VERSION ${VERNUM}.${FIXNUM} SOVERSION ${VERNUM}) -add_executable(zzipwrap ${ZZIPWRAP_SRCS} ) +add_executable(zzipwrap ${zzipwrap_SRCS} ) target_link_libraries(zzipwrap libzzipwrap ) # install ######################################################## -# - nothing +install(FILES ${libzzipwrap_HDRS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/zzip ) +install(TARGETS libzzipwrap + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})