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 Commander.h
WinHelpers.cc) 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) add_executable(phonebook phonebook.cc)
target_link_libraries(phonebook klib) target_link_libraries(phonebook klib)

View File

@ -17,7 +17,7 @@ set(CPACK_DEBIAN_PACKAGE_SECTION devel)
if(LINUX) if(LINUX)
set(CPACK_GENERATOR "DEB;STGZ;TGZ") set(CPACK_GENERATOR "DEB;STGZ;TGZ")
elseif(APPLE) elseif(APPLE)
set(CPACK_GENERATOR "PACKAGEMAKER") set(CPACK_GENERATOR "productbuild")
elseif(MSVC OR MSYS OR MINGW) elseif(MSVC OR MSYS OR MINGW)
set(CPACK_GENERATOR "NSIS;ZIP") set(CPACK_GENERATOR "NSIS;ZIP")
else() else()
@ -32,3 +32,4 @@ set(CPACK_SOURCE_IGNORE_FILES
/.*build.*) /.*build.*)
include (CPack) include (CPack)
add_custom_target(package_docs DEPENDS klib_docs package package_source)