← Back to team overview

kicad-developers team mailing list archive

Re: OCE and KiCad

 

Le 06/07/2016 à 10:46, Wayne Stambaugh a écrit :
> On 7/6/2016 4:07 AM, Bernhard Stegmaier wrote:
>> On 06.07.2016 09:28, Wayne Stambaugh wrote:
>>>> 2. What is the availability of OCE/OpenCascade on the
>>>> different platforms and how do we ensure run-time linkage?
>>>> On Linux the run-time linkage is not a problem, but I don't
>>>> know how things work on OSX and Windows is a free-for-all
>>>> which may require us to build OCE for distribution to ensure
>>>> that everything works.
>>>
>>> This is important.  I would suggest that you check the availability of
>>> packaged binaries on windows, linux, and osx.  If these binary packages
>>> are not available for a given package, then you need to make sure they
>>> build on each platform.  At a minimum they should use a build config
>>> tool such as cmake or autotools.  You can always enlist some of the devs
>>> for help to verify if a library builds on platforms you do not have
>>> access to.
>>
>> oce 0.17.x seems to be available (and mantained) for OS X both via
>> MacPorts and homebrew.
>> I can try to build it this evening, but I don't expect it to cause any
>> problems (it is contained in the official repositories of both).
>>
>>
>> Regards,
>> Bernhard
>>
> 
> Thanks Bernhard.  I just cloned oce and will try to build it on
> msys2/mingw64 some time today.  One thing I noticed is the OCE license
> is LGPL 2.1 not 2.1+.  I do not know if that is an issue for us.  I
> suspect not but I do not claim to be a licensing expert so if anyone
> else knows if this OK or not please speak up.
> 
> Wayne
> 

I just built OCE on msys2, W7, 32 bits (but not yet tested the examples)
OCE is easy to install with Git.

Due to a lot of files to include or link, I had to use the response files (.rsp files) in makefiles
(the command lines were too long without response files).
I slightly patched cmakelists.txt (attached the patch which enables the response files).

-- 
Jean-Pierre CHARRAS
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 29891da..2b18115 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -125,6 +125,18 @@ if(WIN32)
 	mark_as_advanced(OCE_AUTOINSTALL_DEPENDENT_LIBS)
 endif()

+
+if( MSYS )
+    # JPC: use a response file for include and link, because the environment buffer is too small
+    # when there are a lot of files to link or include
+    set( CMAKE_C_USE_RESPONSE_FILE_FOR_INCLUDES 1 )
+    set( CMAKE_CXX_USE_RESPONSE_FILE_FOR_INCLUDES 1 )
+    set( CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1 )
+    set( CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS 1 )
+    #set( CMAKE_CXX_RESPONSE_FILE_LINK_FLAG "@" )
+endif()
+
+
 if ((MSVC AND NOT NMAKE) OR CMAKE_COMPILER_IS_GNUCXX)
 	set(OCE_COMPILER_SUPPORTS_PCH TRUE)
 	if(MSVC)

Follow ups

References