-
Notifications
You must be signed in to change notification settings - Fork 43
/
CmakeLists.txt
47 lines (32 loc) · 1.23 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
cmake_minimum_required(VERSION 3.3.1)
cmake_policy(VERSION 3.3.1)
set(PROJECT_NAME "BrowserCollector")
project(${PROJECT_NAME})
include(cmake/CheckVariable.cmake)
set(CMAKE_CXX_STANDARD 14)
add_definitions(-DCJSON_HIDE_SYMBOLS)
if(MSVC)
set(CMAKE_CXX_FLAGS_RELEASE "/MT /GS /analyze- /W3 /Zc:wchar_t /Gm- /O1 /Ob1 /Zc:inline /fp:precise /errorReport:prompt /WX- /Zc:forScope /GR /Gd /Oy- /EHsc /nologo")
endif()
INCLUDE_DIRECTORIES(
miscs
includes
)
if (CMAKE_BUILD_TYPE MATCHES Debug)
message(" ")
message("CMAKE IN DEBUG MODE")
message(" ")
elseif(CMAKE_BUILD_TYPE MATCHES Release)
message(" ")
message("CMAKE IN RELEASE MODE")
message(" ")
endif ()
file(GLOB_RECURSE HEADERS_FILES "${CMAKE_CURRENT_SOURCE_DIR}/includes/*.h")
message(STATUS "===============================================================")
message(STATUS "--------------------------Options------------------------------")
check_option(BUILD_EXECUTABLE "Build Executable?" ON)
message(STATUS "----------------------------------------------------------------")
if(BUILD_EXECUTABLE)
file(GLOB_RECURSE SOURCES_FILES_EXE "${CMAKE_CURRENT_SOURCE_DIR}/src/*.c*")
add_executable(${PROJECT_NAME} ${HEADERS_FILES} ${SOURCES_FILES_EXE})
endif()