Closed tkarabela closed 3 years ago
Okey! Actually I originally did not want to define openmesheffect again in here, but for some reason that I really could not find this CMakeLists was not aware of the fact that openmesheffect target is defined in the parent directory. Does it work for you, to just drop the definition of openmesheffect target from CppPluginSupport/CMakeLists.txt
?
Does it work for you, to just drop the definition of openmesheffect target from
CppPluginSupport/CMakeLists.txt
?
Yes, I can compile MfxVTK when I just add_subdirectory(OpenMeshEffect)
while not having the openmesheffect
target at all in CppPluginSupport/CMakeLists.txt
. In the patch, I put it behind condition instead of removing it entirely just to be sure I didn't break it for anyone else.
Though it shouldn't be necessary, as long one does add_subdirectory(OpenMeshEffect)
instead of add_subdirectory(OpenMeshEffect/CppPluginSupport)
.
I've tried to
add_subdirectory(OpenMeshEffect)
in MfxVTK and had to make this change to get CMake to build on Linux. It just skips definition if target already exists, so hopefully it shouldn't break anything.Not sure why the target definition is necessary in the first place, unless one is using
CppPluginSupport/CMakeLists.txt
directly and not through./CMakeLists.txt
. I use CLion on Linux, which identifies the project with the top-level CMakeList and builds targets from that. Maybe it's a MS Visual Studio thing? I don't know. Anyway, it should be working now.