X-Git-Url: https://git.armaanb.net/?a=blobdiff_plain;f=CMakeLists.txt;h=31151dedca7fea02e78518484fd45d184479b830;hb=11665c1b3741eaf7c4cc51f54ce7c5b8f8467f18;hp=44a96e8c862e951570c109f1249580d7c963e22f;hpb=889d7af2ebb3991457adedf94260ac28ec691f1a;p=gen-shell.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 44a96e8..31151de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,39 +1,14 @@ cmake_minimum_required (VERSION 2.8) -set (CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake") set (HAVE_CMAKE true) project (gen-shell) include (CXXSniffer) -set (PROJECT_VERSION "0.0.1") - include (CheckFunctionExists) include (CheckStructHasMember) include (CheckCXXCompilerFlag) -message ("-- Looking for SHA1 references") -if (EXISTS ${CMAKE_SOURCE_DIR}/.git/index) - set (HAVE_COMMIT true) - execute_process (COMMAND git log -1 --pretty=format:%h - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - OUTPUT_VARIABLE COMMIT) - configure_file ( ${CMAKE_SOURCE_DIR}/commit.h.in - ${CMAKE_SOURCE_DIR}/commit.h) - message ("-- Found SHA1 reference: ${COMMIT}") -endif (EXISTS ${CMAKE_SOURCE_DIR}/.git/index) - -set (PACKAGE "${PROJECT_NAME}") -set (VERSION "${PROJECT_VERSION}") -set (PACKAGE_NAME "${PACKAGE}") -set (PACKAGE_TARNAME "${PACKAGE}") -set (PACKAGE_VERSION "${VERSION}") -set (PACKAGE_STRING "${PACKAGE} ${VERSION}") - -SET (GEN-SHELL_DOCDIR share/doc/gen-shell CACHE STRING "Installation directory for doc files") -SET (GEN-SHELL_RCDIR "${GEN-SHELL_DOCDIR}/rc" CACHE STRING "Installation directory for configuration files") -SET (GEN-SHELL bin CACHE STRING "Installation directory for the binary") - # include the readline library finder module set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules") @@ -52,16 +27,3 @@ configure_file ( ${CMAKE_SOURCE_DIR}/cmake.h) add_subdirectory (src) -if (EXISTS ${CMAKE_SOURCE_DIR}/test) - add_subdirectory (test EXCLUDE_FROM_ALL) -endif (EXISTS ${CMAKE_SOURCE_DIR}/test) - -# --- - -set (CPACK_SOURCE_GENERATOR "TGZ") -set (CPACK_SOURCE_PACKAGE_FILE_NAME ${PACKAGE_NAME}-${PACKAGE_VERSION}) -set (CPACK_SOURCE_IGNORE_FILES "CMakeCache" "CMakeFiles" "CPackConfig" "CPackSourceConfig" - "_CPack_Packages" "cmake_install" "install_manifest" "Makefile$" - "test" "package-config" "misc/*" "src/gen-shell$" "README.md" - "/\\\\.gitignore" "/\\\\.git/" "swp$") -include (CPack)