Skip to content

Commit

Permalink
CMake: USE_SWIG_DEPENDENCIES for CMake 3.20+
Browse files Browse the repository at this point in the history
  • Loading branch information
ferdnyc committed Jun 21, 2021
1 parent d9ea98e commit 93cdfae
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bindings/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ if (DEFINED _inc)
set_property(SOURCE openshot.i PROPERTY INCLUDE_DIRECTORIES ${_inc})
endif()

### (FINALLY!)
### Properly manage dependencies (regenerate bindings after changes)
if (CMAKE_VERSION VERSION_GREATER 3.20)
set_property(SOURCE openshot.i PROPERTY USE_SWIG_DEPENDENCIES TRUE)
endif()

### Add the SWIG interface file (which defines all the SWIG methods)
if (CMAKE_VERSION VERSION_LESS 3.8.0)
swig_add_module(pyopenshot python openshot.i)
Expand Down
6 changes: 6 additions & 0 deletions bindings/ruby/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ if (DEFINED _inc)
set_property(SOURCE openshot.i PROPERTY INCLUDE_DIRECTORIES ${_inc})
endif()

### (FINALLY!)
### Properly manage dependencies (regenerate bindings after changes)
if (CMAKE_VERSION VERSION_GREATER 3.20)
set_property(SOURCE openshot.i PROPERTY USE_SWIG_DEPENDENCIES TRUE)
endif()

### Add the SWIG interface file (which defines all the SWIG methods)
if (CMAKE_VERSION VERSION_LESS 3.8.0)
swig_add_module(rbopenshot ruby openshot.i)
Expand Down

0 comments on commit 93cdfae

Please sign in to comment.