mirror of
https://github.com/TheLartians/ModernCppStarter.git
synced 2025-09-03 23:50:53 +02:00
make it useable for me
extent cmake-format config file use package-lock too
This commit is contained in:
parent
d4c654f026
commit
47fa7c6933
14 changed files with 225 additions and 29 deletions
|
@ -9,6 +9,7 @@ include(../cmake/tools.cmake)
|
|||
# ---- Dependencies ----
|
||||
|
||||
include(../cmake/CPM.cmake)
|
||||
CPMUsePackageLock(package-lock.cmake)
|
||||
|
||||
CPMAddPackage(
|
||||
NAME cxxopts
|
||||
|
@ -21,10 +22,11 @@ CPMAddPackage(NAME Greeter SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/..)
|
|||
|
||||
# ---- Create standalone executable ----
|
||||
|
||||
file(GLOB sources CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/source/*.cpp)
|
||||
file(GLOB sources CONFIGURE_DEPENDS source/*.cpp)
|
||||
|
||||
add_executable(GreeterStandalone ${sources})
|
||||
|
||||
# TODO: why rename in this way?
|
||||
set_target_properties(GreeterStandalone PROPERTIES CXX_STANDARD 17 OUTPUT_NAME "Greeter")
|
||||
|
||||
# WORKAROUND for ALIAS target is missing error! CK
|
||||
|
|
47
standalone/package-lock.cmake
Normal file
47
standalone/package-lock.cmake
Normal file
|
@ -0,0 +1,47 @@
|
|||
# CPM Package Lock This file should be committed to version control
|
||||
|
||||
# Ccache.cmake
|
||||
CPMDeclarePackage(
|
||||
Ccache.cmake
|
||||
NAME
|
||||
Ccache.cmake
|
||||
VERSION
|
||||
1.2.1
|
||||
GITHUB_REPOSITORY
|
||||
TheLartians/Ccache.cmake
|
||||
)
|
||||
# cxxopts
|
||||
CPMDeclarePackage(
|
||||
cxxopts
|
||||
NAME
|
||||
cxxopts
|
||||
VERSION
|
||||
2.2.0
|
||||
GITHUB_REPOSITORY
|
||||
jarro2783/cxxopts
|
||||
OPTIONS
|
||||
"CXXOPTS_BUILD_EXAMPLES Off"
|
||||
"CXXOPTS_BUILD_TESTS Off"
|
||||
)
|
||||
# Greeter (unversioned) CPMDeclarePackage(Greeter local directory ) PackageProject.cmake
|
||||
CPMDeclarePackage(
|
||||
PackageProject.cmake
|
||||
NAME
|
||||
PackageProject.cmake
|
||||
VERSION
|
||||
1.4.1
|
||||
GITHUB_REPOSITORY
|
||||
TheLartians/PackageProject.cmake
|
||||
)
|
||||
# fmt
|
||||
CPMDeclarePackage(
|
||||
fmt
|
||||
NAME
|
||||
fmt
|
||||
GIT_TAG
|
||||
7.1.3
|
||||
GITHUB_REPOSITORY
|
||||
fmtlib/fmt
|
||||
OPTIONS
|
||||
"FMT_INSTALL YES"
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue