Commit e9a81593 authored by Arkadiusz Janz's avatar Arkadiusz Janz

Update CMakeLists.txt

parent d883f472
......@@ -2,10 +2,13 @@ project(corpus2mwe)
cmake_minimum_required(VERSION 2.8)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
set(CMAKE_INSTALL_PREFIX /usr)
set(corpus2_mwe_ver_major "0")
set(corpus2_mwe_ver_minor "1")
set(corpus2_mwe_ver_patch "0")
set(corpus2mwe_ver_major "0")
set(corpus2mwe_ver_minor "1")
set(corpus2mwe_ver_patch "0")
set(CORPUS2MWE_VERSION "${corpus2mwe_ver_major}.${corpus2mwe_ver_minor}.${corpus2mwe_ver_patch}")
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMakeScripts)
set(CMAKE_BUILD_TYPE Debug)
......@@ -22,6 +25,29 @@ else()
message(STATUS "WARNING: SWIG not found - Python wrappers will not be built")
endif(SWIG_FOUND)
# Sets a default install location for packages installed from deb - we use
# the same location as it's used when we build projects directly from source
set(CPACK_PACKAGING_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
# Detect python version descriptor
if(WCCL_BUILD_SWIG)
find_package(PythonLibs)
find_package(PythonInterp)
set(PYTHON_VERSION "python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
endif(WCCL_BUILD_SWIG)
# Set *.deb package name and version
if(PYTHON_VERSION)
SET(CPACK_PACKAGE_NAME "${PROJECT_NAME}-${PYTHON_VERSION}")
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CORPUS2MWE_VERSION}-all")
else()
SET(CPACK_PACKAGE_NAME "${PROJECT_NAME}")
SET(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${CORPUS2MWE_VERSION}-all")
endif(PYTHON_VERSION)
SET(CPACK_PACKAGE_VERSION "${CORPUS2MWE_VERSION}")
SET(CPACK_GENERATOR "DEB")
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "arkadiusz.janz@pwr.edu.pl")
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "g419")
INCLUDE(CPack)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment