-
Notifications
You must be signed in to change notification settings - Fork 31
/
CMakeLists.txt
38 lines (33 loc) · 1.04 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
cmake_minimum_required(VERSION 3.24.0)
project(perfect-loader
VERSION "1.0"
DESCRIPTION "A perfect loader implementation"
HOMEPAGE_URL "https://github.com/EvanMcBroom/perfect-loader"
LANGUAGES CXX
)
if (${CMAKE_PROJECT_NAME} STREQUAL ${PROJECT_NAME})
set(MAIN_PROJECT TRUE)
else()
set(MAIN_PROJECT FALSE)
set(PROJECT_NAME library_perfect_loader)
endif()
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED YES)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
add_library(${PROJECT_NAME} STATIC)
target_sources(${PROJECT_NAME} PRIVATE
include/perfect_loader.hpp
include/pl/hook.hpp
include/pl/lazy.hpp
include/pl/mmap.hpp
include/pl/pe.hpp
include/pl/types.hpp
)
target_include_directories(${PROJECT_NAME} PUBLIC include)
if (${MAIN_PROJECT})
add_executable(run)
target_link_libraries(run PRIVATE ${PROJECT_NAME})
add_library(testdll SHARED)
target_link_libraries(testdll PRIVATE ${PROJECT_NAME})
endif()
add_subdirectory(source)