aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-07-04 09:05:17 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2023-07-04 09:07:31 +0200
commitbfcc735f1a64ea1e68261352539866f73c73f813 (patch)
tree1623b0a3236773b65b845da5dc458676ae3907e7
parentMakefile: move the prelude to prelude.mk (diff)
downloadprivilege-check-bfcc735f1a64ea1e68261352539866f73c73f813.tar.gz
privilege-check-bfcc735f1a64ea1e68261352539866f73c73f813.zip
update cmake-common
Also, change the build directory to build/.
Diffstat (limited to '')
-rw-r--r--.github/workflows/ci.yml2
-rw-r--r--.gitignore2
-rw-r--r--CMakeLists.txt2
-rw-r--r--Makefile17
-rw-r--r--README.md2
m---------cmake0
6 files changed, 10 insertions, 15 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3e83d06..3b1ad08 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -47,5 +47,5 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: 'privilege-check-${{ matrix.toolset }}-${{ matrix.platform }}-${{ matrix.configuration }}'
- path: '${{ runner.workspace }}/build/install/'
+ path: './build/install/'
if-no-files-found: error
diff --git a/.gitignore b/.gitignore
index f5b9598..70c3859 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,3 @@
-/.build/
+/build/
*.aps
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6c1e904..f78398a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.8)
project(privilege_check CXX)
diff --git a/Makefile b/Makefile
index 4c2a12d..4c398d7 100644
--- a/Makefile
+++ b/Makefile
@@ -1,20 +1,18 @@
include prelude.mk
TOOLSET ?= mingw
+PLATFORM ?= auto
CONFIGURATION ?= Debug
CMAKE_FLAGS ?=
this_dir := $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
src_dir := $(this_dir)
-ifdef CI
-build_dir := $(this_dir)../build
-else
-build_dir := $(this_dir).build
-endif
+build_dir := $(this_dir)build
cmake_dir := $(build_dir)/cmake
DESTDIR ?= $(build_dir)/install
$(eval $(call noexpand,TOOLSET))
+$(eval $(call noexpand,PLATFORM))
$(eval $(call noexpand,CONFIGURATION))
$(eval $(call noexpand,CMAKE_FLAGS))
$(eval $(call noexpand,DESTDIR))
@@ -28,18 +26,15 @@ clean:
.PHONY: build
build:
-ifdef CI
- cd cmake && python3 -m project.ci.cmake --install -- $(CMAKE_FLAGS)
-else
- cd cmake && python3 -m project.cmake.build \
+ cd cmake && python3 -m project.build \
--toolset '$(call escape,$(TOOLSET))' \
+ --platform '$(call escape,$(PLATFORM))' \
--configuration '$(call escape,$(CONFIGURATION))' \
- --build '$(call escape,$(cmake_dir))' \
--install '$(call escape,$(DESTDIR))' \
-- \
'$(call escape,$(src_dir))' \
+ '$(call escape,$(cmake_dir))' \
$(CMAKE_FLAGS)
-endif
.PHONY: install
install: build
diff --git a/README.md b/README.md
index 0c134c8..920b8a8 100644
--- a/README.md
+++ b/README.md
@@ -22,7 +22,7 @@ Build using CMake.
The project is Windows-only, so building with either MSVC or MinGW-64 is
required.
-There's a Makefile with useful shortcuts to build the project in the .build/
+There's a Makefile with useful shortcuts to build the project in the build/
directory (defaults to building with MinGW-w64):
make build
diff --git a/cmake b/cmake
-Subproject b230fffce638cdac8837ba9d9d343d9a93cef2e
+Subproject 23a96df0cedd7236fbd70087c8e3ee12b222040