Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCE_LIBRARIES contains DRAWEXE #660

Closed
janusw opened this issue Mar 9, 2017 · 6 comments
Closed

OCE_LIBRARIES contains DRAWEXE #660

janusw opened this issue Mar 9, 2017 · 6 comments

Comments

@janusw
Copy link

janusw commented Mar 9, 2017

Hi,

I have successfully built OCE 0.18 with -DOCE_DRAW=ON. Now, if I want to link my own application to OCE via

TARGET_LINK_LIBRARIES(myApp ${OCE_LIBRARIES})

I get:

/usr/bin/ld: cannot find -lDRAWEXE

It seems that OCE_LIBRARIES wrongly includes DRAWEXE (which obviously is not a library).

Hope it's not a big deal to fix this ...

Cheers,
Janus

@janusw
Copy link
Author

janusw commented Mar 9, 2017

The obvious workaround is of course to manually remove DRAWEXE from OCEConfig.cmake, but certainly it should not get in there in the first place.

For completeness, this is how the relevant part of the generated OCEConfig.cmake looks in my case:

set(OCE_LIBRARIES "TKernel;TKMath;TKG2d;TKG3d;TKGeomBase;TKBRep;TKGeomAlgo;TKTopAlgo;TKPrim;TKBO;TKHLR;TKMesh;TKShHealing;TKXMesh;TKBool;TKFillet;TKFeat;TKOffset;TKService;TKV3d;TKOpenGl;TKMeshVS;TKNIS;TKVoxel;TKCDF;PTKernel;TKLCAF;FWOSPlugin;TKPShape;TKBinL;TKXmlL;TKPLCAF;TKTObj;TKShapeSchema;TKStdLSchema;TKCAF;TKBin;TKXml;TKPCAF;TKBinTObj;TKXmlTObj;TKStdSchema;TKSTL;TKXSBase;TKSTEPBase;TKIGES;TKSTEPAttr;TKSTEP209;TKSTEP;TKVRML;TKXCAF;TKXCAFSchema;TKXmlXCAF;TKBinXCAF;TKXDEIGES;TKXDESTEP;TKDraw;TKTopTest;TKViewerTest;TKXSDRAW;TKDCAF;TKXDEDRAW;TKTObjDRAW;DRAWEXE")

@janusw
Copy link
Author

janusw commented Mar 10, 2017

Btw, the same problem seems to occur with earlier versions as well (e.g. I see it also with 0.14).

@janusw
Copy link
Author

janusw commented Mar 10, 2017

Also the package "oce-draw 0.17.2-1" as shipped in Ubuntu 16.10 is affected.

@gladk
Copy link

gladk commented Mar 10, 2017

How important is this problem? It looks like the current oce in Debian is also affected. It is theoretically possible to fix it there before the next large stable release.

Thanks

@janusw
Copy link
Author

janusw commented Mar 12, 2017

Well, as mentioned it's easy to work around it, but it's still annoying. It should definitely be fixed for the next release.

Here is a suggestion for a simple fix:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index dd56a4d..eba6380 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -990,7 +990,8 @@ macro(process_module modulename modules_std)
                list(APPEND modules ${ARGN})
        endif(NOT OCE_DISABLE_X11)
        foreach(module ${modules})
-               list(APPEND OCE_LIBRARIES ${module})
+               if(NOT module MATCHES ".*EXE")
+                       list(APPEND OCE_LIBRARIES ${module})
+		endif()
                set(TOOLKIT_MODULES "")
                set(TOOLKIT_DEPENDS "")
                set(TOOLKIT_INCLUDE_DIRECTORIES "")

@janusw
Copy link
Author

janusw commented Apr 14, 2017

The branch is merged (thanks for that!). Closing the issue ...

@janusw janusw closed this as completed Apr 14, 2017
janusw added a commit to janusw/oce that referenced this issue Apr 21, 2017
janusw added a commit to janusw/oce that referenced this issue Apr 21, 2017
janusw added a commit to janusw/oce that referenced this issue Jul 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants