update packaging

This commit is contained in:
Kyle Isom 2023-10-10 19:09:25 -07:00
parent bf1ea5e749
commit 6317c2dd36
2 changed files with 11 additions and 2 deletions

View File

@ -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)

View File

@ -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)