-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f1f197c
commit 3460054
Showing
10 changed files
with
30 additions
and
37 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
cmake_minimum_required(VERSION 3.22) | ||
cmake_minimum_required(VERSION 3.18) | ||
|
||
project(proj) | ||
|
||
add_subdirectory(src) | ||
add_subdirectory(external) | ||
add_subdirectory(example) |
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 |
---|---|---|
@@ -1,6 +1,2 @@ | ||
cmake_minimum_required(VERSION 3.22) | ||
|
||
project(example) | ||
|
||
add_executable(example example.cpp) | ||
target_link_libraries(example lib) | ||
target_link_libraries(example ${PROJECT_NAME}) |
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
#include <lib.h> | ||
#include "../include/SomeClass.h" | ||
|
||
int main() | ||
{ | ||
Test t; | ||
SomeClass t; | ||
t.func(); | ||
|
||
return 0; | ||
|
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,2 @@ | ||
add_subdirectory(scapix) | ||
# Other libs here |
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,11 @@ | ||
include(FetchContent) | ||
FetchContent_Declare( | ||
cmodule | ||
URL "https://github.com/scapix-com/cmodule/archive/refs/tags/v1.0.33.tar.gz" | ||
URL_HASH SHA256=b56bf2f3b5acb979f1242757976eaf525caeea70714caa6e19571f65e0b60727 | ||
) | ||
FetchContent_MakeAvailable(cmodule) | ||
|
||
find_package(Scapix REQUIRED) | ||
|
||
scapix_bridge_headers(${PROJECT_NAME} "com.example.lib" ${CMAKE_SOURCE_DIR}/include/SomeClass.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,6 @@ | ||
#include <scapix/bridge/object.h> | ||
|
||
class SomeClass : public scapix::bridge::object<SomeClass> { | ||
public: | ||
void func(); | ||
}; |
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 |
---|---|---|
@@ -1,18 +1,5 @@ | ||
cmake_minimum_required(VERSION 3.22) | ||
set(SOURCE_FILES SomeClass.cpp) | ||
|
||
project(lib) | ||
add_library(${PROJECT_NAME} SHARED ${SOURCE_FILES} ${CMAKE_SOURCE_DIR}/include/SomeClass.h) | ||
|
||
add_library(lib lib.cpp lib.h) | ||
target_include_directories(lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) | ||
|
||
include(FetchContent) | ||
FetchContent_Declare( | ||
cmodule | ||
URL "https://github.com/scapix-com/cmodule/archive/refs/tags/v1.0.32.tar.gz" | ||
URL_HASH SHA256=e6937c95d73188a5add846b27cd00160fe4f6ea31af33be417d2ab7ac19bd8d2 | ||
) | ||
FetchContent_MakeAvailable(cmodule) | ||
|
||
find_package(Scapix REQUIRED) | ||
|
||
scapix_bridge_headers(lib "com.example.lib" ${CMAKE_CURRENT_SOURCE_DIR}/lib.h) | ||
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_SOURCE_DIR}/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,3 @@ | ||
#include "../include/SomeClass.h" | ||
|
||
void SomeClass::func() {} |
This file was deleted.
Oops, something went wrong.