![]() |
ImFusion SDK 4.3
|
In order to build custom applications with the ImFusion SDK you need to set up your build environment correctly. The installed version of the ImFusion SDK comes with package files for CMake that enable straight-forward integration of the ImFusionLib and plugins into a CMake-based build.
CMake is a cross-platform software for specifying the build process of executables and libraries. It will generate native project files (e.g. Visual Studio Solutions, Makefiles) so that you can develop your software in your preferred build environment. If you're not familiar with CMake, you can find an introduction to how to use CMake in the official CMake documentation. We recommend to follow modern (target-based) practices when writing CMake builds.
The ImFusion SDK ships a CMake package config with the installer, which located in $(IMFUSION_SDK)\cmake
(Windows) or /usr/lib/cmake/ImFusionLib
(Linux). If the ImFusion SDK was installed correctly, a CMake call to find_package(ImFusionLib)
should locate the package config automatically. Optionally, use the COMPONENTS
argument to specify additional ImFusion plugins.
The CMake package defines targets for the ImFusionLib and all specified plugins. Linking your application/library against those targets using target_link_libraries(YourLibName PRIVATE ImFusionLib)
will automatically add the needed include directories, etc. to your target.
Since the ImFusion SDK does not ship Qt you will need to find_package(Qt6)
or find_package(Qt5)
(depending on the version your installer was built for) and link it yourself. If CMake does not locate Qt automatically, set Qt6_DIR
or Qt5_DIR
accordingly, e.g. <Qt6 install dir>/lib/cmake/Qt6
.
For using the ImFusion SDK within a custom build environment configure the following:
$(IMFUSION_SDK)\include
(Windows) or /usr/include/ImFusionLib
(Linux)$(IMFUSION_SDK)\include\ext
(windows) or /usr/include/ImFusionLib/ext
(Linux)$(IMFUSION_SDK)\lib\ImFusionLib.lib
(Windows) or /usr/lib/libImFusionLib.so
(Linux)$(IMFUSION_SDK)\lib\plugins
(Windows) or /usr/lib/ImFusionLib/plugins