-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #77 from PipeRift/feature/cpp-binding
Added Clang
- Loading branch information
Showing
9 changed files
with
74 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
file(GLOB_RECURSE BACKEND_CPP_SOURCE_FILES CONFIGURE_DEPENDS Src/*.cpp Src/*.h) | ||
|
||
add_library(RiftBindingNative STATIC) | ||
add_library(rift::Bindings::Native ALIAS RiftBindingNative) | ||
target_include_directories(RiftBindingNative PUBLIC Include) | ||
target_sources(RiftBindingNative PRIVATE ${BACKEND_CPP_SOURCE_FILES}) | ||
pipe_target_enable_CPP20(RiftBindingNative) | ||
set_target_properties (RiftBindingNative PROPERTIES FOLDER Rift) | ||
pipe_target_define_platform(RiftBindingNative) | ||
pipe_target_shared_output_directory(RiftBindingNative) | ||
|
||
target_link_libraries(RiftBindingNative PUBLIC rift::Rift) | ||
target_link_libraries(RiftBindingNative PRIVATE RiftClang) | ||
|
||
install(TARGETS RiftBindingNative | ||
EXPORT RiftTargets | ||
LIBRARY DESTINATION Lib | ||
ARCHIVE DESTINATION Lib | ||
RUNTIME DESTINATION Bin | ||
INCLUDES DESTINATION Include | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright 2015-2022 Piperift - All rights reserved | ||
|
||
#pragma once | ||
|
||
#include <Plugin.h> | ||
#include <Rift.h> | ||
|
||
|
||
namespace rift | ||
{ | ||
class NativeBindingPlugin : public Plugin | ||
{ | ||
CLASS(NativeBindingPlugin, Plugin) | ||
|
||
public: | ||
void Register(TPtr<Rift> rift) override {} | ||
}; | ||
} // namespace rift |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Native Binding | ||
|
||
This plugin allows Rift to understand C and Cpp headers and use them to link against their binaries. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// Copyright 2015-2022 Piperift - All rights reserved | ||
|
||
#include "NativeBinding.h" | ||
|
||
#include <clang/Index/IndexSymbol.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// Copyright 2015-2022 Piperift - All rights reserved | ||
|
||
#include <Pipe/Memory/NewDelete.h> | ||
// PIPE_OVERRIDE_NEW_DELETE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters