File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,7 +25,14 @@ find_package(pythonic REQUIRED)
2525# The viewer also depends on GLFW at link/config time; projects that
2626# link `pythonic::pythonic_graph_viewer` may want to ensure GLFW is
2727# available. Find it here to provide clearer error messages early.
28- find_package (GLFW REQUIRED )
28+ find_package (glfw3 REQUIRED )
29+
30+ # Find ImageMagick for image rendering support
31+ find_package (ImageMagick COMPONENTS Magick++ REQUIRED )
32+
33+ # Find FFmpeg for video rendering support
34+ find_package (PkgConfig REQUIRED )
35+ pkg_check_modules (FFMPEG REQUIRED libavcodec libavformat libswscale libavutil )
2936
3037# Add your executable
3138# --> Replace 'demoapp' with your project executable name
@@ -38,7 +45,10 @@ add_executable(demoapp demo.cpp)
3845
3946# Link libraries to your target
4047# --> Add other libraries here if your project depends on them
41- target_link_libraries (demoapp PRIVATE pythonic::pythonic )
48+ target_link_libraries (demoapp PRIVATE pythonic::pythonic ImageMagick::Magick++ ${FFMPEG_LIBRARIES} )
49+
50+ # Add FFmpeg include directories
51+ target_include_directories (demoapp PRIVATE ${FFMPEG_INCLUDE_DIRS} )
4252
4353# If you installed Pythonic with the optional Graph Viewer enabled
4454# (build/install Pythonic with `-DPYTHONIC_ENABLE_GRAPH_VIEWER=ON`),
Original file line number Diff line number Diff line change @@ -296,11 +296,19 @@ find_package(OpenGL REQUIRED)
296296# Find the Pythonic library
297297find_package(pythonic REQUIRED)
298298
299+ # Find ImageMagick and FFmpeg for media rendering support (images and videos)
300+ find_package(ImageMagick COMPONENTS Magick++ REQUIRED)
301+ find_package(PkgConfig REQUIRED)
302+ pkg_check_modules(FFMPEG REQUIRED libavcodec libavformat libswscale libavutil)
303+
299304# Add your executable (replace main.cpp with your source files)
300305add_executable(myapp main.cpp)
301306
302- # Link the Pythonic library
303- target_link_libraries(myapp PRIVATE pythonic::pythonic)
307+ # Link the Pythonic library and media dependencies
308+ target_link_libraries(myapp PRIVATE pythonic::pythonic ImageMagick::Magick++ ${FFMPEG_LIBRARIES})
309+
310+ # Add FFmpeg include directories
311+ target_include_directories(myapp PRIVATE ${FFMPEG_INCLUDE_DIRS})
304312
305313# If you built and installed Pythonic with the Graph Viewer enabled,
306314# link the viewer target to enable `var::show()` in your app:
You can’t perform that action at this time.
0 commit comments