for the memcached server (http://memcached.org/). It has been designed
to be light on memory usage, thread safe, and provide full access to
server side methods.")
-if(CMAKE_VERSION VERSION_LESS 3.12)
- string(REPLACE ";" "-" CPACK_PACKAGE_DIRECTORY "${CMAKE_BINARY_DIR}/${PROJECT_CONFIG}")
-else()
- list(JOIN PROJECT_CONFIG "-" CPACK_PACKAGE_DIRECTORY)
-endif()
+set(CPACK_PROJECT_CONFIG ${PROJECT_CONFIG})
set(CPACK_PROJECT_CONFIG_FILE "${CMAKE_SOURCE_DIR}/CPack/ProjectConfig.txt")
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME}/${PROJECT_VERSION}")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md")
set(CPACK_CHANGELOG_FILE "${CMAKE_SOURCE_DIR}/ChangeLog-1.1.md")
+set(CPACK_PACKAGE_DIRECTORY "${CMAKE_BINARY_DIR}")
execute_process(
COMMAND git describe --tags --match [0-9]*.*
string(STRIP "${PROJECT_TAG}" PROJECT_TAG)
if(PROJECT_TAG)
set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${PROJECT_TAG})
+ set(CPACK_PACKAGE_VERSION ${PROJECT_TAG})
else()
set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${PROJECT_VERSION})
+ set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
endif()
# dependencies
set(PUSH_ARTIFACTS_SH "${CMAKE_SOURCE_DIR}/scripts/push-artifacts.sh")
if(WIN32)
- set(PUSH_ARTIFACTS_CMD msys2 -c '${PUSH_ARTIFACTS_SH} ${CPACK_PACKAGE_DIRECTORY}/')
+ set(PUSH_ARTIFACTS_CMD msys2 -c '${PUSH_ARTIFACTS_SH} ${CPACK_PACKAGE_VERSION}')
else()
- set(PUSH_ARTIFACTS_CMD ${PUSH_ARTIFACTS_SH} ${CPACK_PACKAGE_DIRECTORY}/)
+ set(PUSH_ARTIFACTS_CMD ${PUSH_ARTIFACTS_SH} ${CPACK_PACKAGE_VERSION})
endif()
add_custom_target(push-artifacts
COMMAND ${PUSH_ARTIFACTS_CMD}
- WORKING_DIRECTORY ${CPACK_BINARY_DIR}
+ WORKING_DIRECTORY ${CPACK_PACKAGE_DIRECTORY}
)