forked from Bill-Gray/PDCursesMod
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
83 lines (50 loc) · 1.98 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
cmake_minimum_required(VERSION 3.11)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "MinSizeRel" CACHE STRING "Choose the type of build, options are: Debug, Release, or MinSizeRel." FORCE)
message(STATUS "CMAKE_BUILD_TYPE not set, defaulting to MinSizeRel.")
endif()
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${CMAKE_SOURCE_DIR}/cmake")
include (get_version)
project(pdcurses VERSION "${CURSES_VERSION}" LANGUAGES C)
if(MSVC)
set(CMAKE_DEBUG_POSTFIX d)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP") # enable parallel builds
endif()
message(STATUS "Generator .............. ${CMAKE_GENERATOR}")
message(STATUS "Build Type ............. ${CMAKE_BUILD_TYPE}")
include(build_options)
include(build_dependencies)
message(STATUS "PDC Version ............ ${PROJECT_VERSION}")
include(gen_config_header)
file(GLOB pdcurses_src_files pdcurses/*.c)
if(CYGWIN)
message(STATUS "Windows Kit UM lib path = ${WINDOWS_KIT_LIBRARY_DIR}")
link_directories(${WINDOWS_KIT_LIBRARY_DIR})
endif()
if(PDC_DOS_BUILD) # currently requires a unique toolchain file
add_subdirectory(dos)
elseif(PDC_DOSVGA_BUILD) # currently requires a unique toolchain file
add_subdirectory(dosvga)
elseif(PDC_DOSVT_BUILD) # currently requires a unique toolchain file
add_subdirectory(vt)
elseif(PDC_OS2_BUILD) # currently requires a unique toolchain file
add_subdirectory(os2)
else()
add_subdirectory(ncurses)
if(PDC_SDL2_BUILD)
add_subdirectory(sdl2)
endif()
if(PDC_GL_BUILD)
add_subdirectory(gl)
endif()
if(UNIX)
add_subdirectory(vt)
endif()
if(WIN32)
add_subdirectory(wincon)
add_subdirectory(wingui)
add_subdirectory(vt)
endif()
endif()
add_custom_target(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_SOURCE_DIR}/cmake/make_uninstall.cmake")
set(CPACK_COMPONENTS_ALL applications)