-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
42 lines (31 loc) · 1.18 KB
/
CMakeLists.txt
File metadata and controls
42 lines (31 loc) · 1.18 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
cmake_minimum_required(VERSION 3.5)
project (ushell)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED)
# Enable warnings project-wide
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
add_compile_options(-Wno-cast-function-type)
elseif(MSVC)
add_compile_options(/W4)
endif()
set(PLUGINS_LIST test_plugin)
if(MSVC OR MSYS OR MINGW)
SET(INSTALL_APP_DIR "bin/windows")
SET(INSTALL_PLUGIN_DIR "bin/windows/plugins")
SET(PLUGIN_INSTALL_TYPE RUNTIME)
else()
SET(INSTALL_APP_DIR "bin/linux")
SET(INSTALL_PLUGIN_DIR "bin/linux/plugins")
SET(PLUGIN_INSTALL_TYPE LIBRARY)
endif()
if( CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT )
message(STATUS "Setting default CMAKE_INSTALL_PREFIX path to ../")
set(CMAKE_INSTALL_PREFIX "../" CACHE STRING "The path to use for make install" FORCE)
endif()
add_subdirectory(sources)
############################################################
# Install
############################################################
install(TARGETS ushell DESTINATION ${INSTALL_APP_DIR})
install(TARGETS ${PLUGINS_LIST} ${PLUGIN_INSTALL_TYPE} DESTINATION ${INSTALL_PLUGIN_DIR})