-
Notifications
You must be signed in to change notification settings - Fork 5
/
CMakeLists.txt
39 lines (31 loc) · 1.05 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
39
cmake_minimum_required(VERSION 3.6)
project(jbigkit VERSION 2.1)
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED True)
add_library(jbig libjbig/jbig.c
libjbig/jbig.h
libjbig/jbig_ar.c
libjbig/jbig_ar.h
libjbig/jbig85.c
libjbig/jbig85.h
libjbig/tstcodec.c
libjbig/tstcodec85.c
libjbig/tstjoint.c )
if(NOT MSVC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -W -Wno-unused-result")
endif()
include(GNUInstallDirs)
install(
FILES ${CMAKE_CURRENT_SOURCE_DIR}/libjbig/jbig.h
${CMAKE_CURRENT_SOURCE_DIR}/libjbig/jbig_ar.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)
install(TARGETS jbig
LIBRARY DESTINATION lib)
# uninstall target
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)