diff options
| author | kaizhangNV <149626564+kaizhangNV@users.noreply.github.com> | 2024-07-17 12:53:19 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-17 10:53:19 -0700 |
| commit | 2db15080085856ed9b5f20642dbb354aac59a888 (patch) | |
| tree | 4f6558b8c3aac5e5191edaa092230ecb449f4a44 /prelude | |
| parent | 7d07bd29fee7dcd74fe73940723effc68f427e67 (diff) | |
Move the file public header files to `include` dir (#4636)
* Move the file public header files to `include` dir
Close the issue (#4635).
Move the following headers files to a `include` dir
located at root dir of slang repo:
slang-com-helper.h -> include/slang-com-helper.h
slang-com-ptr.h -> include/slang-com-ptr.h
slang-gfx.h -> include/slang-gfx.h
slang.h -> include/slang.h
Change cmake/SlangTarget.cmake to add include path to
every target, and change the source file to use
"#include <slang.h>" to include the public headers.
The source code update is by the script like follow:
```
fileNames_slang=$(grep -r "\".*slang\.h\"" source/ -l)
for fileName in "${fileNames_slang[@]}"
do
echo "$fileName"
sed -i "s/\".*slang\.h\"/\"slang\.h\"/" $fileName
done
```
* Fix the test issues
* Fix cpu test issues by adding include seach path
* Update cmake to not add include path for every target
Also change "#include <slang.h>" to "include "slang.h" " to
make the coding style consistent with other slang code.
* Change public include to private include for unit-test and slang-glslang
Diffstat (limited to 'prelude')
| -rw-r--r-- | prelude/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | prelude/slang-cpp-host-prelude.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/prelude/CMakeLists.txt b/prelude/CMakeLists.txt index 6b5c190e7..173cce542 100644 --- a/prelude/CMakeLists.txt +++ b/prelude/CMakeLists.txt @@ -24,7 +24,7 @@ slang_add_target( EXPLICIT_SOURCE ${SLANG_PRELUDE_SOURCE} EXCLUDE_FROM_ALL TARGET_NAME prelude - INCLUDE_DIRECTORIES_PUBLIC ${CMAKE_CURRENT_LIST_DIR} + INCLUDE_DIRECTORIES_PUBLIC ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_CURRENT_LIST_DIR}/../include PUBLIC_HEADERS ${CMAKE_CURRENT_LIST_DIR}/slang*.h # It's an object library, so the install step only installs the headers INSTALL diff --git a/prelude/slang-cpp-host-prelude.h b/prelude/slang-cpp-host-prelude.h index f69d03eed..48056169d 100644 --- a/prelude/slang-cpp-host-prelude.h +++ b/prelude/slang-cpp-host-prelude.h @@ -8,7 +8,7 @@ #define SLANG_COM_PTR_ENABLE_REF_OPERATOR 1 #include "../source/slang-rt/slang-rt.h" -#include "../slang-com-ptr.h" +#include "slang-com-ptr.h" #include "slang-cpp-types.h" #ifdef SLANG_LLVM |
