]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
build: Add headers to CMake project files (#1178)
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>
Sat, 15 Oct 2022 18:15:59 +0000 (21:15 +0300)
committerGitHub <noreply@github.com>
Sat, 15 Oct 2022 18:15:59 +0000 (20:15 +0200)
Useful for listing them in the IDE project tree, for IDEs that use
CMake file api (like Qt Creator).

src/CMakeLists.txt
src/core/CMakeLists.txt
src/storage/CMakeLists.txt
src/storage/local/CMakeLists.txt
src/storage/remote/CMakeLists.txt
src/third_party/CMakeLists.txt
src/third_party/blake3/CMakeLists.txt
src/util/CMakeLists.txt
unittest/CMakeLists.txt

index 6a7cb3f799da7be99b63bf1e6e19f8d069f3b267..7ae93c38fb628ba49fbf887d87864b49285d2cc8 100644 (file)
@@ -36,6 +36,9 @@ if(WIN32)
   list(APPEND source_files Win32Util.cpp)
 endif()
 
+file(GLOB headers *.hpp)
+list(APPEND source_files ${headers})
+
 add_library(ccache_framework STATIC ${source_files})
 
 if(WIN32)
index 6932336f39435d9f223cefa990252e62a86526a0..1fa9f7073f5defcbf46140e394b8a5b230cb3d6c 100644 (file)
@@ -14,4 +14,7 @@ set(
   types.cpp
 )
 
+file(GLOB headers *.hpp)
+list(APPEND sources ${headers})
+
 target_sources(ccache_framework PRIVATE ${sources})
index e5476cc391955f1f3f15f9d08956030f83c3bf99..907d16fdcf68fb06323499f36c08dbbd8fffef49 100644 (file)
@@ -6,4 +6,7 @@ set(
   Storage.cpp
 )
 
+file(GLOB headers *.hpp)
+list(APPEND sources ${headers})
+
 target_sources(ccache_framework PRIVATE ${sources})
index 88703781ac4a900aea047580978d7c308fa05a9c..7b0d4f05a1f6a1706cab5f5c5d483a11a7426c53 100644 (file)
@@ -9,4 +9,7 @@ set(
   util.cpp
 )
 
+file(GLOB headers *.hpp)
+list(APPEND sources ${headers})
+
 target_sources(ccache_framework PRIVATE ${sources})
index 8d14eca18b5250707624e448657691613329defd..96dbebb0b3d51274da7dd01608346b073c94f512 100644 (file)
@@ -9,4 +9,7 @@ if(REDIS_STORAGE_BACKEND)
   list(APPEND sources RedisStorage.cpp)
 endif()
 
+file(GLOB headers *.hpp)
+list(APPEND sources ${headers})
+
 target_sources(ccache_framework PRIVATE ${sources})
index fe43d594b987b6f93002258dfc4800f2f6357594..0d6ffb3e2574bb81ca1e1e6fa760acf568193eef 100644 (file)
@@ -14,6 +14,9 @@ if(ENABLE_TRACING)
   target_sources(third_party PRIVATE minitrace.c)
 endif()
 
+file(GLOB headers *.h fmt/*.h nonstd/*.hpp win32/*.h)
+target_sources(third_party PRIVATE ${headers})
+
 set(xxhdispatchtest [=[
 #include "xxh_x86dispatch.c"
 
index 14583773559c67a8a8ce56eb3509993409e31a4e..a30342d5d332cfea5049e28b5404da7982997af3 100644 (file)
@@ -115,3 +115,6 @@ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
     target_compile_definitions(blake3 PRIVATE BLAKE3_USE_NEON)
   endif()
 endif()
+
+file(GLOB headers *.h)
+target_sources(blake3 PRIVATE ${headers})
index f3133e715156c1f8306c8218349b2f77d7e40859..560f79f91f8de8ca7f5db82f03f6522ae39e6456 100644 (file)
@@ -11,4 +11,7 @@ set(
   zstd.cpp
 )
 
+file(GLOB headers *.hpp)
+list(APPEND sources ${headers})
+
 target_sources(ccache_framework PRIVATE ${sources})
index fc54fe01a4e6f52943fe1e8bb92b8232ef1d5313..e0ec8b3251e541d0bb47d376f18fe008135ccfeb 100644 (file)
@@ -42,6 +42,9 @@ if(WIN32)
   list(APPEND source_files test_bsdmkstemp.cpp test_Win32Util.cpp)
 endif()
 
+file(GLOB headers *.hpp)
+list(APPEND source_files ${headers})
+
 add_executable(unittest ${source_files})
 
 if(MSVC)