Reindent Packaging.cmake
It was using tabs instead of spaces. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
7d3b7fc48a
commit
cc0e8662a8
|
@ -1,31 +1,31 @@
|
||||||
if(NOT VERSION)
|
if(NOT VERSION)
|
||||||
set(VERSION "unknown")
|
set(VERSION "unknown")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
string(REGEX REPLACE "^v?([0-9.]+)-?(.*)$"
|
string(REGEX REPLACE "^v?([0-9.]+)-?(.*)$"
|
||||||
"\\1;\\2" version_result ${VERSION})
|
"\\1;\\2" version_result ${VERSION})
|
||||||
|
|
||||||
list(LENGTH version_result version_result_list_length)
|
list(LENGTH version_result version_result_list_length)
|
||||||
|
|
||||||
if(version_result_list_length EQUAL 2)
|
if(version_result_list_length EQUAL 2)
|
||||||
list(GET version_result 0 version_num)
|
list(GET version_result 0 version_num)
|
||||||
list(GET version_result 1 version_gitstamp)
|
list(GET version_result 1 version_gitstamp)
|
||||||
else(version_result_list_length EQUAL 2)
|
else(version_result_list_length EQUAL 2)
|
||||||
message("Unable to deduce a meaningful version number. \
|
message("Unable to deduce a meaningful version number. \
|
||||||
Set OVERRIDE_VERSION when you run CMake (cmake .. -DOVERRIDE_VERSION=3.14.159), or \
|
Set OVERRIDE_VERSION when you run CMake (cmake .. -DOVERRIDE_VERSION=3.14.159), or \
|
||||||
just build from a git repository.")
|
just build from a git repository.")
|
||||||
set(version_num "0.0.0")
|
set(version_num "0.0.0")
|
||||||
set(version_gitstamp "")
|
set(version_gitstamp "")
|
||||||
endif(version_result_list_length EQUAL 2)
|
endif(version_result_list_length EQUAL 2)
|
||||||
|
|
||||||
if(version_gitstamp)
|
if(version_gitstamp)
|
||||||
set(version_gitsuffix "~git${version_gitstamp}")
|
set(version_gitsuffix "~git${version_gitstamp}")
|
||||||
else(version_gitstamp)
|
else(version_gitstamp)
|
||||||
set(version_gitsuffix "")
|
set(version_gitsuffix "")
|
||||||
endif(version_gitstamp)
|
endif(version_gitstamp)
|
||||||
|
|
||||||
string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)"
|
string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)"
|
||||||
"\\1;\\2;\\3" version_num_split ${version_num})
|
"\\1;\\2;\\3" version_num_split ${version_num})
|
||||||
|
|
||||||
list(APPEND version_num_split 0 0 0) #ensure the list(GET )) commands below never fail
|
list(APPEND version_num_split 0 0 0) #ensure the list(GET )) commands below never fail
|
||||||
|
|
||||||
|
@ -40,21 +40,21 @@ message(STATUS "Package version will be set to ${version_num}${version_gitsuffix
|
||||||
set(CPACK_PACKAGE_VERSION "${version_num}${version_gitsuffix}")
|
set(CPACK_PACKAGE_VERSION "${version_num}${version_gitsuffix}")
|
||||||
|
|
||||||
if(NOT CPACK_GENERATOR)
|
if(NOT CPACK_GENERATOR)
|
||||||
a_find_program(rpmbuild_path "rpmbuild" FALSE)
|
a_find_program(rpmbuild_path "rpmbuild" FALSE)
|
||||||
if(rpmbuild_path)
|
if(rpmbuild_path)
|
||||||
message(STATUS "rpmbuild found, enabling RPM for the 'package' target")
|
message(STATUS "rpmbuild found, enabling RPM for the 'package' target")
|
||||||
list(APPEND CPACK_GENERATOR RPM)
|
list(APPEND CPACK_GENERATOR RPM)
|
||||||
else(rpmbuild_path)
|
else(rpmbuild_path)
|
||||||
message(STATUS "The 'package' target will not build a RPM")
|
message(STATUS "The 'package' target will not build a RPM")
|
||||||
endif(rpmbuild_path)
|
endif(rpmbuild_path)
|
||||||
|
|
||||||
a_find_program(dpkg_path "dpkg" FALSE)
|
a_find_program(dpkg_path "dpkg" FALSE)
|
||||||
if (dpkg_path)
|
if (dpkg_path)
|
||||||
message(STATUS "dpkg found, enabling DEB for the 'package' target")
|
message(STATUS "dpkg found, enabling DEB for the 'package' target")
|
||||||
list(APPEND CPACK_GENERATOR DEB)
|
list(APPEND CPACK_GENERATOR DEB)
|
||||||
else(dpkg_path)
|
else(dpkg_path)
|
||||||
message(STATUS "The 'package' target will not build a DEB")
|
message(STATUS "The 'package' target will not build a DEB")
|
||||||
endif(dpkg_path)
|
endif(dpkg_path)
|
||||||
endif(NOT CPACK_GENERATOR)
|
endif(NOT CPACK_GENERATOR)
|
||||||
|
|
||||||
set(CPACK_PACKAGE_NAME "awesome")
|
set(CPACK_PACKAGE_NAME "awesome")
|
||||||
|
@ -62,7 +62,7 @@ set(CPACK_DEBIAN_PACKAGE_MAINTAINER "devnull@example.com")
|
||||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A tiling window manager")
|
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A tiling window manager")
|
||||||
|
|
||||||
if(CPACK_GENERATOR)
|
if(CPACK_GENERATOR)
|
||||||
include(CPack)
|
include(CPack)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# vim: filetype=cmake:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80:foldmethod=marker
|
# vim: filetype=cmake:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80:foldmethod=marker
|
||||||
|
|
Loading…
Reference in New Issue