liboceanography/CMakeLists.txt

33 lines
775 B
CMake
Raw Permalink Normal View History

2011-06-02 04:17:39 +02:00
# Top-level CMakeLists.txt for liboceanography
2011-01-11 03:01:30 +01:00
cmake_minimum_required(VERSION 2.8)
2011-01-15 05:36:52 +01:00
project(liboceanography C)
2011-01-11 03:01:30 +01:00
2011-06-02 04:17:39 +02:00
set(oceanography_version 1.0.0)
# Prevent build in source directory
if ("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
message (FATAL_ERROR "Building in the source directory is not supported.")
endif ()
include_directories(src)
add_definitions(-Wall -W -Wextra -Wstrict-prototypes -pedantic -ansi -std=c89)
2011-01-11 03:01:30 +01:00
add_subdirectory(src)
add_subdirectory(tests)
enable_testing()
2011-06-02 04:24:31 +02:00
# Packaging stuff
set(CPACK_SOURCE_PACKAGE_FILE_NAME liboceanography-${oceanography_version})
set(CPACK_SOURCE_IGNORE_FILES
"~$"
"^\\\\.*$"
"^${PROJECT_SOURCE_DIR}/build/"
"^${PROJECT_SOURCE_DIR}/docs/_build/"
)
set(CPACK_SOURCE_GENERATOR TGZ)
include(CPack)