[PATCH v2 6/6] CMake: make the project compatible ´with building as a subproject

2023-09-11 Thread yegorslists
From: Yegor Yefremov Use CMAKE_CURRENT_*_DIR in the mein CMakeLists.txt and PROJECT_*_DIR in the subdirectories. --- CMakeLists.txt | 14 +++--- examples/CMakeLists.txt| 4 ++-- ftdi_eeprom/CMakeLists.txt | 2 +- ftdipp/CMakeLists.txt | 2 +-

[PATCH v2 4/6] CMake: rework subdirectory handling

2023-09-11 Thread yegorslists
From: Yegor Yefremov Move all mandatory subdirs to the top and also make if clauses more readable. --- CMakeLists.txt | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 947fb34..7f72e0c 100644 --- a/CMakeLists.txt +++

[PATCH v2 5/6] ftdipp/CMakeLists.txt: remove VIM modline settings

2023-09-11 Thread yegorslists
From: Yegor Yefremov Indentation settings will be handled via the EditorConfig project. --- ftdipp/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/ftdipp/CMakeLists.txt b/ftdipp/CMakeLists.txt index 38932ae..fa2711f 100644 --- a/ftdipp/CMakeLists.txt +++

[PATCH v2 3/6] CMake: rework findlibusb module

2023-09-11 Thread yegorslists
From: Yegor Yefremov Rename the module to FindLibUSB.cmake and use it as the only way of finding libusb. Bonus: perform CMake linting of the module. --- CMakeLists.txt | 14 +++--- cmake/{FindUSB1.cmake => FindLibUSB.cmake} | 13 +++-- 2 files

[PATCH v2 2/6] CMake: report CMake version

2023-09-11 Thread yegorslists
From: Yegor Yefremov --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 24da84d..39857a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,7 @@ cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) +message(STATUS "CMake

[PATCH v2 1/6] CMake: use dedicated recipe for documentation generation

2023-09-11 Thread yegorslists
From: Yegor Yefremov Use PROJECT_SOURCE_DIR and PROJECT_BINARY_DIR to refer to the top source directory. --- CMakeLists.txt| 22 +- doc/CMakeLists.txt| 26 ++ doc/Doxyfile.in | 8 doc/Doxyfile.xml.in | 2 +-