forked from winsiderss/systeminformer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
49 lines (39 loc) · 1.48 KB
/
Copy pathCMakeLists.txt
File metadata and controls
49 lines (39 loc) · 1.48 KB
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
#
# Copyright (c) 2022 Winsider Seminars & Solutions, Inc. All rights reserved.
#
# This file is part of System Informer.
#
cmake_minimum_required(VERSION 3.30.0 FATAL_ERROR)
project(SystemInformer)
set(SI_ROOT ${CMAKE_CURRENT_SOURCE_DIR})
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
include(commands)
set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE)
# TODO change this to bin once we fully transition to cmake
# set up to allow user to disable with "" or "OFF"
set(SI_OUTPUT_DIR "${SI_ROOT}/bin-cmake" CACHE PATH "Output directory")
option(SI_WITH_CORE "Configure core projects" ON)
option(SI_WITH_PLUGINS "Configure plugin projects" OFF)
option(SI_WITH_KERNEL "Configure kernel projects" OFF)
option(SI_WITH_PREFAST "Enables prefast analysis" OFF)
option(SI_WITH_WPP_USER "Enables user mode WPP trace" OFF)
option(SI_WITH_WPP_KERNEL "Enables kernel mode WPP trace" ON)
if (MSVC_NOT_CLANG AND CMAKE_BUILD_TYPE STREQUAL "Release")
add_compile_options(/d1trimfile:${SI_ROOT})
endif()
if(SI_WITH_CORE)
add_subdirectory(SystemInformer)
add_subdirectory(phnt)
add_subdirectory(phlib)
add_subdirectory(tools)
endif()
if(SI_WITH_KERNEL)
message(FATAL_ERROR "Kernel mode projects are not supported")
add_subdirectory(KSystemInformer)
endif()
if(SI_WITH_PLUGINS)
add_subdirectory(plugins)
endif()
if(SI_WITH_CORE OR SI_WITH_KERNEL)
add_subdirectory(kphlib)
endif()