rhubarb-lip-sync/CMakeLists.txt

44 lines
1.1 KiB
CMake
Raw Normal View History

cmake_minimum_required(VERSION 3.2)
include(appInfo.cmake)
# Build and install main executable
add_subdirectory(rhubarb)
2015-12-29 10:44:55 +00:00
# Install extras
install(
DIRECTORY extras
DESTINATION .
)
# Install misc. files
install(
FILES README.adoc LICENSE.md VERSION.md
DESTINATION .
)
2015-11-11 19:25:47 +00:00
# Configure CPack
function(get_short_system_name variable)
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
set(${variable} "OSX" PARENT_SCOPE)
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
set(${variable} "Win32" PARENT_SCOPE)
else()
set(${variable} "${CMAKE_SYSTEM_NAME}" PARENT_SCOPE)
endif()
endfunction()
2016-01-12 21:04:11 +00:00
set(CPACK_PACKAGE_NAME ${appName})
string(REPLACE " " "-" CPACK_PACKAGE_NAME "${CPACK_PACKAGE_NAME}")
get_short_system_name(CPACK_SYSTEM_NAME)
2016-01-12 21:04:11 +00:00
set(CPACK_PACKAGE_VERSION_MAJOR ${appVersionMajor})
set(CPACK_PACKAGE_VERSION_MINOR ${appVersionMinor})
set(CPACK_PACKAGE_VERSION_PATCH ${appVersionPatch})
set(CPACK_PACKAGE_VERSION ${appVersion})
2016-08-11 14:56:13 +00:00
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}")
string(TOLOWER "${CPACK_PACKAGE_FILE_NAME}" CPACK_PACKAGE_FILE_NAME)
2016-01-12 21:04:11 +00:00
set(CPACK_GENERATOR ZIP)
# Run CPack
2016-01-13 11:01:22 +00:00
include(CPack)