ImGui integration for external project #2621
-
Hi; For osgEarth integration part, I'm able to link & compile my external project. Now I need to integrate ImGui to my external project. In this step, I'm facing some issues: When I check the CMakeLists.txt file of the osgearth_imgui project, it contains this code, which is defined in osgearth-macros.cmake file:
I copied this helper cmake to my project and myCMakeLists.txt is (there are additional SETs, which are not shown here):
The reason I want to use ImGui code inside osgearth/src/ImGui is there are predefined integration code and some UI in those files. I also added ImGui as a submodule to my project (as it is done in osgEarth) so that build process continues smoothly with ImGui. Problem 1: Problem 2:
I'm unable to compile with this order because I'm getting So I added
However, this time I'm getting a lot of error in StringUtils, Units, weejobs etc. headers, symbols/macros are conflicting. This time my problem is, am I doing right to trying to use "osgEarth/ImGui/ImGuiApp"? Is my method correct or is it wrong? If wrong, what can you suggest? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Additionally, when used with
I'm still getting MAX_PATH and GetLogicalDriveStringsA not defined errors. |
Beta Was this translation helpful? Give feedback.
-
The master branch of osgEarth has a share/ExternalProject folder which demonstrates how to do this properly. You do not need to copy any of the macros into your own project. Give that a try and see how you get along. Later this month we will release a dot version that incorporates the new correct cmake setup. |
Beta Was this translation helpful? Give feedback.
The master branch of osgEarth has a share/ExternalProject folder which demonstrates how to do this properly. You do not need to copy any of the macros into your own project. Give that a try and see how you get along. Later this month we will release a dot version that incorporates the new correct cmake setup.