forked from zimbadev/crystalserver
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
31 lines (24 loc) · 969 Bytes
/
CMakeLists.txt
File metadata and controls
31 lines (24 loc) · 969 Bytes
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
cmake_minimum_required(VERSION 3.22 FATAL_ERROR)
# Base configurations and settings for the project
include(BaseConfig)
include(GNUInstallDirs)
# Import configurations, source definitions, and linker settings
include(CrystalLib)
# Define main executable target, set it up and link to main library
add_executable(${PROJECT_NAME} main.cpp)
if(MSVC)
# Add executable icon for Windows
target_sources(${PROJECT_NAME} PRIVATE ../cmake/crystalserver.rc)
endif()
setup_target(${PROJECT_NAME})
set_output_directory(${PROJECT_NAME})
target_link_libraries(${PROJECT_NAME} PRIVATE ${PROJECT_NAME}_lib)
# Configurar IPO e Linkagem Incremental para o executável
configure_linking(${PROJECT_NAME})
# Compiler warnings and options
if (UNIX)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_compile_options(${PROJECT_NAME}_lib PRIVATE -Wall -Wextra -Wpedantic)
target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Wpedantic)
endif()
endif()