-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
35 lines (27 loc) · 880 Bytes
/
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
cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
project(console-component-generator CXX)
if(NOT EXISTS "${CMAKE_HOME_DIRECTORY}/cmake/CPM.cmake")
file(DOWNLOAD https://raw.githubusercontent.com/TheLartians/CPM.cmake/master/cmake/CPM.cmake "${CMAKE_HOME_DIRECTORY}/cmake/CPM.cmake")
endif()
include(cmake/CPM.cmake)
CPMAddPackage(
NAME console
GITHUB_REPOSITORY edenreich/console-component
VERSION 1.0.6
OPTIONS
"WITH_TESTS Off"
)
include_directories(${CMAKE_BINARY_DIR}/dist/include)
set(SOURCES_CXX_FILES
src/main.cpp
src/commands/make_command.h
src/commands/make_command.cpp
)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin)
add_executable(${PROJECT_NAME} ${SOURCES_CXX_FILES})
set_target_properties(
${PROJECT_NAME}
PROPERTIES
OUTPUT_NAME "console-gen"
)
target_link_libraries(${PROJECT_NAME} -static stdc++fs console)