Skip to content

Commit

Permalink
linux cpack work
Browse files Browse the repository at this point in the history
  • Loading branch information
wwiv committed Jul 15, 2020
1 parent b05f7cf commit b45b3f8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
15 changes: 10 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,18 @@ install(TARGETS wwivutil DESTINATION .)

if (UNIX)
set(PLATFORM_DIR "${WWIV_INSTALL_SRC}/platform/unix")
# Copy shell scripts, rest can be from unix.zip
file(GLOB PLATFORM_FILES "${PLATFORM_DIR}/*.sh")
foreach(file ${PLATFORM_FILES})
message(DEBUG "Installing ${file}")
INSTALL(FILES "${file}" DESTINATION .)
endforeach()
elseif(WIN32)
set(PLATFORM_DIR "${WWIV_INSTALL_SRC}/platform/win32")
install(DIRECTORY "${PLATFORM_DIR}" DESTINATION .)
endif()

file(GLOB PLATFORM_FILES "${PLATFORM_DIR}/*")
INSTALL(FILES ${PLATFORM_FILES} DESTINATION .)

file(GLOB DOCS_FILES "${WWIV_INSTALL_SRC}/docs/*")
install(FILES ${DOCS_FILES} DESTINATION .)
#install(DIRECTORY "${PLATFORM_DIR}" DESTINATION . FILES_MATCHING PATTERN "*")
foreach(file ${DOCS_FILES})
INSTALL(FILES "${file}" DESTINATION .)
endforeach()
4 changes: 2 additions & 2 deletions cmake/Common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ ENDMACRO(MACRO_ENSURE_OUT_OF_SOURCE_BUILD)
message(VERBOSE "CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")

function(zip output_file input_files working_dir)
message(DEBUG "zip: ${output_file} : ${input_files}")
#message(DEBUG "zip: ${output_file} : ${input_files}")
add_custom_command(
COMMAND ${CMAKE_COMMAND} -E tar "cf" "${output_file}" --format=zip -- ${input_files}
WORKING_DIRECTORY "${working_dir}"
Expand All @@ -168,7 +168,7 @@ function(create_datafile_archive arc dir)
zip("${WWIV_RELEASE_DIR}/${arc}.zip" "${DATA_FILES}" "${dir}/")
set(ARC_PATH "${WWIV_RELEASE_DIR}/${arc}.zip")
add_custom_target("${arc}_archive" ALL DEPENDS "${ARC_PATH}")
message(TRACE "P: ${ARC_PATH}")
#message(TRACE "P: ${ARC_PATH}")
install(FILES "${ARC_PATH}" DESTINATION .)
endfunction()

0 comments on commit b45b3f8

Please sign in to comment.