You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cmkr/CMakeLists.txt

83 lines
1.3 KiB

# This file was generated automatically by cmkr.
# Regenerate CMakeLists.txt file when necessary
include(cmkr.cmake OPTIONAL RESULT_VARIABLE CMKR_INCLUDE_RESULT)
if(CMKR_INCLUDE_RESULT)
cmkr()
endif()
4 years ago
cmake_minimum_required(VERSION 3.15)
4 years ago
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
4 years ago
set(cmkr_PROJECT_VERSION 0.1.3)
4 years ago
project(cmkr VERSION ${cmkr_PROJECT_VERSION})
include(FetchContent)
FetchContent_Declare(
filesystem
GIT_REPOSITORY https://github.com/gulrak/filesystem
)
FetchContent_MakeAvailable(filesystem)
FetchContent_Declare(
mpark_variant
URL https://github.com/mpark/variant/archive/v1.4.0.tar.gz
)
FetchContent_MakeAvailable(mpark_variant)
FetchContent_Declare(
toml11
GIT_REPOSITORY https://github.com/ToruNiina/toml11
)
FetchContent_MakeAvailable(toml11)
4 years ago
set(CMKRLIB_SOURCES
src/cmake.cpp
src/gen.cpp
src/help.cpp
src/build.cpp
src/error.cpp
)
4 years ago
add_library(cmkrlib STATIC ${CMKRLIB_SOURCES})
4 years ago
target_include_directories(cmkrlib PUBLIC
include
)
target_link_libraries(cmkrlib PUBLIC
toml11::toml11
ghc_filesystem
mpark_variant
)
4 years ago
target_compile_features(cmkrlib PUBLIC
cxx_std_11
)
4 years ago
set(CMKR_SOURCES
src/main.cpp
src/args.cpp
4 years ago
)
add_executable(cmkr ${CMKR_SOURCES})
target_link_libraries(cmkr PUBLIC
4 years ago
cmkrlib
4 years ago
)
4 years ago
install(
TARGETS cmkr
DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
COMPONENT cmkr
4 years ago
)
4 years ago