View Issue Details

IDProjectCategoryView StatusLast Update
0000661FreeCADBugpublic2012-04-03 19:58
Reporterchinasaurli Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version 
Target VersionFixed in Version0.13 
Summary0000661: cmake build on Mac OS: dealing with dylib versus so
DescriptionCurrently a cmake build on Mac OS will create dylib libraries (because add_library is always SHARED rather than MODULE in the CMakeLists).

Remarkably, Python can't seem to figure out that import _coin means use _coin.dylib. I'm not sure what the right way to deal with this is, but here's one possibility:
TagsNo tags attached.
FreeCAD Information

Activities

chinasaurli

2012-04-03 17:45

reporter   ~0001874

Sorry, here's one possibility:

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -385,6 +385,9 @@ IF(MINGW)
        SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -mthreads -W
        LINK_LIBRARIES(-lgdi32)
 ENDIF(MINGW)
+IF(APPLE)
+ SET(CMAKE_SHARED_LIBRARY_SUFFIX ".so")
+ENDIF(APPLE)
 
 add_subdirectory(src)
 add_subdirectory(data)


My build is still somewhat broken (crashes when switching to most workbenches) but changing everything to .so instead of .dylib didn't seem to make it any more broken, and now it finds the Python imports.

wmayer

2012-04-03 19:58

administrator   ~0001880

Patch applied

Issue History

Date Modified Username Field Change
2012-04-03 16:35 chinasaurli New Issue
2012-04-03 17:45 chinasaurli Note Added: 0001874
2012-04-03 19:58 wmayer Note Added: 0001880
2012-04-03 19:58 wmayer Status new => closed
2012-04-03 19:58 wmayer Resolution open => fixed
2012-04-03 19:58 wmayer Fixed in Version => 0.13