From 3724429006fdea92c86d5ed1758f6456955e0f38 Mon Sep 17 00:00:00 2001 From: Bryan Bernhart Date: Fri, 30 Sep 2022 19:55:21 -0700 Subject: [PATCH] Remove src folder from public config. --- CMakeLists.txt | 3 +-- README.md | 2 +- src/fuzzers/BUILD.gn | 2 ++ src/gpgmm/common/BUILD.gn | 6 ++---- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d195a4e9a..d74804a4b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -130,7 +130,6 @@ endif() # GPGMM's public and common "configs" # ############################################################################### set(GPGMM_INCLUDE_DIRS - "${GPGMM_ROOT_DIR}/src" "${GPGMM_INCLUDE_DIR}" ) @@ -142,7 +141,7 @@ add_library(gpgmm_public_config INTERFACE) target_include_directories(gpgmm_public_config INTERFACE "${GPGMM_INCLUDE_DIRS}") add_library(gpgmm_common_config INTERFACE) -target_link_libraries(gpgmm_common_config INTERFACE gpgmm_public_config) +target_include_directories(gpgmm_common_config INTERFACE "${GPGMM_ROOT_DIR}/src") # Compile definitions for the common config if(GPGMM_ALWAYS_ASSERT) diff --git a/README.md b/README.md index 4b9acdfbb..c3361a5f1 100644 --- a/README.md +++ b/README.md @@ -206,7 +206,7 @@ cmake --build . --config Debug 1. Copy the DLL into the `$(OutputPath)` folder and configure the VS build: 2. Highlight project in the **Solution Explorer**, and then select **Project > Properties**. -3. Under **Configuration Properties > C/C++ > General**, add `gpgmm\src` and `gpgmm\src\include` to **Additional Include Directories**. +3. Under **Configuration Properties > C/C++ > General**, add `gpgmm\src\include` to **Additional Include Directories**. 4. Under **Configuration Properties > Linker > Input**, add ``gpgmm.dll.lib`` to **Additional Dependencies**. 5. Under **Configuration Properties > Linker > General**, add the folder path to `out\Release` to **Additional Library Directories**. diff --git a/src/fuzzers/BUILD.gn b/src/fuzzers/BUILD.gn index e075464f7..877ec4cbd 100644 --- a/src/fuzzers/BUILD.gn +++ b/src/fuzzers/BUILD.gn @@ -48,6 +48,8 @@ if (is_win) { deps = [ "${gpgmm_root_dir}:gpgmm" ] + include_dirs = [ "${gpgmm_root_dir}/src" ] + libs = [ "d3d12.lib", "dxgi.lib", diff --git a/src/gpgmm/common/BUILD.gn b/src/gpgmm/common/BUILD.gn index dffe95024..1ad5ca0d0 100644 --- a/src/gpgmm/common/BUILD.gn +++ b/src/gpgmm/common/BUILD.gn @@ -34,13 +34,11 @@ if (build_with_chromium) { ############################################################################### config("gpgmm_public_config") { - include_dirs = [ - "${gpgmm_root_dir}/src", - "${gpgmm_root_dir}/src/include", - ] + include_dirs = [ "${gpgmm_root_dir}/src/include" ] } config("gpgmm_common_config") { + include_dirs = [ "${gpgmm_root_dir}/src" ] defines = [] if (gpgmm_always_assert || is_debug || use_fuzzing_engine) { defines += [ "GPGMM_ENABLE_ASSERTS" ]