-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
40 lines (31 loc) · 905 Bytes
/
CMakeLists.txt
File metadata and controls
40 lines (31 loc) · 905 Bytes
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
39
40
cmake_minimum_required(VERSION 3.15)
project(dcmloupe VERSION 0.0.1 LANGUAGES C)
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)
if(MSVC)
add_compile_options(/W4) # MSVC for windows
else()
add_compile_options(-Wall -Wextra -pedantic) # GCC/Clang for linux/macOS
endif()
set(SOURCES
src/dicom_dict.c
src/dicom_header_parser.c
src/dicom_display.c
src/main.c
)
set(HEADERS
lib/dicom_dict.h
lib/dicom_header_parser.h
lib/dicom_display.h
)
include_directories(${CMAKE_SOURCE_DIR}/lib)
add_executable(dcmloupe ${SOURCES} ${HEADERS})
if(WIN32)
target_compile_definitions(dcmloupe PRIVATE _CRT_SECURE_NO_WARNINGS)
elseif(UNIX)
target_link_libraries(dcmloupe m) # link math
endif()
install(TARGETS dcmloupe DESTINATION bin)
set(CPACK_PACKAGE_NAME "dcmloupe")
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
include(CPack)