@@ -4,7 +4,7 @@ cmkr, pronounced "cmaker", is A CMakeLists.txt generator from TOML.
44
55
66## Building
7- cmkr requires a C++17 compiler, cmake >= 3.14 .
7+ cmkr requires a C++17 compiler, cmake >= 3.15 .
88```
99git clone https://github.com/moalyousef/cmkr
1010cd cmkr
@@ -16,7 +16,7 @@ cmake --build bin
1616cmkr parses cmake.toml files (using toml11 by Toru Niina) at the project directory. A basic hello world format with the minimum required fields:
1717``` toml
1818[cmake ]
19- minimum = " 3.14 "
19+ minimum = " 3.15 "
2020
2121[project ]
2222name = " app"
@@ -31,14 +31,14 @@ sources = ["src/main.cpp"]
3131This project's cmake.toml:
3232``` toml
3333[cmake ]
34- minimum = " 3.14 "
34+ minimum = " 3.15 "
3535
3636[project ]
3737name = " cmkr"
3838version = " 0.1.0"
3939
4040[fetch-content ]
41- toml11 = { GIT_REPOSITORY = " https://github.com/ToruNiina/toml11" }
41+ toml11 = { git = " https://github.com/ToruNiina/toml11" }
4242
4343[[bin ]]
4444name = " cmkrlib"
@@ -53,12 +53,16 @@ name = "cmkr"
5353type = " exe"
5454sources = [" src/main.cpp" , " src/args.cpp" ]
5555link-libs = [" cmkrlib" ]
56+
57+ [[install ]]
58+ targets = [" cmkr" ]
59+ destination = " ${CMAKE_INSTALL_PREFIX}/bin"
5660```
5761
5862Currently supported fields:
5963``` toml
6064[cmake ] # required for top-level project
61- minimum = " 3.14 " # required
65+ minimum = " 3.15 " # required
6266subdirs = [] # optional
6367bin-dir = " bin" # optional
6468cpp-flags = [] # optional
@@ -76,7 +80,7 @@ Boost = { version = "1.74.0", required = false, components = ["system"] } # opti
7680spdlog = " *"
7781
7882[fetch-content ] # optional, runs fetchContent
79- toml11 = { GIT_REPOSITORY = " https://github.com/ToruNiina/toml11" , GIT_TAG = " v3.5.0" } # optional
83+ toml11 = { git = " https://github.com/ToruNiina/toml11" , tag = " v3.5.0" } # optional
8084
8185[options ] # optional
8286APP_BUILD_STUFF = false # optional
@@ -92,10 +96,17 @@ features = [] # optional
9296defines = [] # optional
9397link-libs = [] # optional
9498
95- [[test ]] # optional
99+ [[test ]] # optional, can define several
96100name = " test1" # required
97101command = " app" # required
98102arguments = [" arg1" , " arg2" ] # optional
103+
104+ [[install ]] # optional, can define several
105+ targets = [" app" ] # optional
106+ files = [" include/*.h" ] # optional
107+ dirs = [] # optional
108+ configs = [] # optional (Release|Debug...etc)
109+ destination = " ${CMAKE_INSTALL_PREFIX}/bin" # required
99110```
100111
101112The cmkr executable can be run from the command-line:
@@ -105,6 +116,7 @@ arguments:
105116 init [exe|lib|shared|static|interface] Starts a new project in the same directory.
106117 gen Generates CMakeLists.txt file.
107118 build <extra cmake args> Run cmake and build.
119+ install Run cmake --install. Needs admin privileges.
108120 clean Clean the build directory.
109121 help Show help.
110122 version Current cmkr version.
0 commit comments