From 6317c2dd369f25086c1fcc8bdaebc7d5eb107614 Mon Sep 17 00:00:00 2001 From: Kyle Isom Date: Tue, 10 Oct 2023 19:09:25 -0700 Subject: [PATCH] update packaging --- CMakeLists.txt | 10 +++++++++- CMakePack.txt | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cadf2d0..eda90d8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,7 +48,15 @@ set(SOURCE_FILES Commander.h WinHelpers.cc) -add_library(klib STATIC ${SOURCE_FILES} ${HEADER_FILES}) +if (APPLE) +add_library(klib + STATIC + ${SOURCE_FILES} ${HEADER_FILES}) +else () +add_library(klib + STATIC + ${SOURCE_FILES} ${HEADER_FILES}) +endif() add_executable(phonebook phonebook.cc) target_link_libraries(phonebook klib) diff --git a/CMakePack.txt b/CMakePack.txt index cd98b69..7e97535 100644 --- a/CMakePack.txt +++ b/CMakePack.txt @@ -17,7 +17,7 @@ set(CPACK_DEBIAN_PACKAGE_SECTION devel) if(LINUX) set(CPACK_GENERATOR "DEB;STGZ;TGZ") elseif(APPLE) -set(CPACK_GENERATOR "PACKAGEMAKER") +set(CPACK_GENERATOR "productbuild") elseif(MSVC OR MSYS OR MINGW) set(CPACK_GENERATOR "NSIS;ZIP") else() @@ -32,3 +32,4 @@ set(CPACK_SOURCE_IGNORE_FILES /.*build.*) include (CPack) +add_custom_target(package_docs DEPENDS klib_docs package package_source) \ No newline at end of file