-
Notifications
You must be signed in to change notification settings - Fork 14
/
CMakeLists.txt
38 lines (33 loc) · 1.2 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
cmake_minimum_required (VERSION 3.1)
project (dumphfdl C)
set (DUMPHFDL_VERSION_MAJOR 1)
set (DUMPHFDL_VERSION_MINOR 6)
set (DUMPHFDL_VERSION_PATCH 1)
set (DUMPHFDL_VERSION "${DUMPHFDL_VERSION_MAJOR}.${DUMPHFDL_VERSION_MINOR}.${DUMPHFDL_VERSION_PATCH}")
set (CMAKE_C_STANDARD 11)
set (C_STANDARD_REQUIRED ON)
set (CMAKE_C_EXTENSIONS OFF)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
message(STATUS "Build type not specified: defaulting to Release")
endif(NOT CMAKE_BUILD_TYPE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Og -DDEBUG")
add_subdirectory (src)
# build a CPack driven installer package
include (InstallRequiredSystemLibraries)
set (CPACK_RESOURCE_FILE_LICENSE
"${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
set (CPACK_RESOURCE_FILE_README
"${CMAKE_CURRENT_SOURCE_DIR}/README.md")
set (CPACK_PACKAGE_VERSION_MAJOR "${DUMPHFDL_VERSION_MAJOR}")
set (CPACK_PACKAGE_VERSION_MINOR "${DUMPHFDL_VERSION_MINOR}")
set (CPACK_PACKAGE_VERSION_PATCH "${DUMPHFDL_VERSION_PATCH}")
set (CPACK_PACKAGE_CHECKSUM "SHA256")
set (CPACK_STRIP_FILES TRUE)
if (UNIX)
set (CPACK_GENERATOR "TGZ")
elseif (WIN32)
set (CPACK_GENERATOR "ZIP")
endif ()
include (CPack)