From 52bc2d4105ac0d10d10831d470e9d0212dbb2b4d Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Fri, 20 Mar 2026 17:39:00 +0100 Subject: libs: fix header globs --- libs/elf/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libs/elf/CMakeLists.txt') diff --git a/libs/elf/CMakeLists.txt b/libs/elf/CMakeLists.txt index 66e59ee..f254094 100644 --- a/libs/elf/CMakeLists.txt +++ b/libs/elf/CMakeLists.txt @@ -1,13 +1,13 @@ add_library("elf" INTERFACE) add_library("libs::elf" ALIAS "elf") +file(GLOB_RECURSE ELF_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "include/**.hpp") + target_sources("elf" INTERFACE FILE_SET HEADERS BASE_DIRS "include" FILES - "include/elf/format.hpp" - "include/elf/section_header.hpp" - + ${ELF_HEADERS} ) target_include_directories("elf" INTERFACE -- cgit v1.2.3 From 9b4cbc6ba3f8059278a20a4893780717851ce8e4 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Tue, 21 Apr 2026 13:06:35 +0200 Subject: build: clean up configuration --- libs/elf/CMakeLists.txt | 43 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) (limited to 'libs/elf/CMakeLists.txt') diff --git a/libs/elf/CMakeLists.txt b/libs/elf/CMakeLists.txt index f254094..f1f5275 100644 --- a/libs/elf/CMakeLists.txt +++ b/libs/elf/CMakeLists.txt @@ -1,7 +1,46 @@ +cmake_minimum_required(VERSION "3.27.0") + +project("elf" + DESCRIPTION "ELF file format library" + VERSION "0.0.1" + LANGUAGES CXX +) + +include("CTest") + +#[============================================================================[ +# External Dependencies +#]============================================================================] + +include("FetchContent") + +if (BUILD_TESTING) + FetchContent_Declare( + "Catch2" + URL "https://github.com/catchorg/Catch2/archive/refs/tags/v3.7.1.tar.gz" + URL_HASH "SHA256=c991b247a1a0d7bb9c39aa35faf0fe9e19764213f28ffba3109388e62ee0269c" + EXCLUDE_FROM_ALL + FIND_PACKAGE_ARGS + ) + + FetchContent_MakeAvailable("Catch2") + + find_package("Catch2") + include("Catch") +endif() + +#[============================================================================[ +# Library +#]============================================================================] + add_library("elf" INTERFACE) -add_library("libs::elf" ALIAS "elf") +add_library("elf::lib" ALIAS "elf") -file(GLOB_RECURSE ELF_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "include/**.hpp") +file(GLOB_RECURSE ELF_HEADERS + RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + CONFIGURE_DEPENDS + "include/**.hpp" +) target_sources("elf" INTERFACE FILE_SET HEADERS -- cgit v1.2.3 From e6c6bda14c9af0df9f4c185701b1e7939db6e1f9 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Thu, 23 Apr 2026 17:12:31 +0200 Subject: elf: restructure according to p1204 --- libs/elf/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libs/elf/CMakeLists.txt') diff --git a/libs/elf/CMakeLists.txt b/libs/elf/CMakeLists.txt index f1f5275..22ca200 100644 --- a/libs/elf/CMakeLists.txt +++ b/libs/elf/CMakeLists.txt @@ -39,18 +39,18 @@ add_library("elf::lib" ALIAS "elf") file(GLOB_RECURSE ELF_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} CONFIGURE_DEPENDS - "include/**.hpp" + "elf/**.hpp" ) target_sources("elf" INTERFACE FILE_SET HEADERS - BASE_DIRS "include" + BASE_DIRS "elf" FILES ${ELF_HEADERS} ) target_include_directories("elf" INTERFACE - "include" + "${CMAKE_CURRENT_SOURCE_DIR}" ) set_target_properties("elf" PROPERTIES -- cgit v1.2.3 From 033ecf6714089d2ce331152f5e120567f8d546cf Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Tue, 19 May 2026 12:48:08 +0200 Subject: build: clean up dependencies --- libs/elf/CMakeLists.txt | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'libs/elf/CMakeLists.txt') diff --git a/libs/elf/CMakeLists.txt b/libs/elf/CMakeLists.txt index 22ca200..1841132 100644 --- a/libs/elf/CMakeLists.txt +++ b/libs/elf/CMakeLists.txt @@ -8,27 +8,6 @@ project("elf" include("CTest") -#[============================================================================[ -# External Dependencies -#]============================================================================] - -include("FetchContent") - -if (BUILD_TESTING) - FetchContent_Declare( - "Catch2" - URL "https://github.com/catchorg/Catch2/archive/refs/tags/v3.7.1.tar.gz" - URL_HASH "SHA256=c991b247a1a0d7bb9c39aa35faf0fe9e19764213f28ffba3109388e62ee0269c" - EXCLUDE_FROM_ALL - FIND_PACKAGE_ARGS - ) - - FetchContent_MakeAvailable("Catch2") - - find_package("Catch2") - include("Catch") -endif() - #[============================================================================[ # Library #]============================================================================] -- cgit v1.2.3