[BioLib-dev] installation on cygwin

Mark A. Jensen maj at fortinbras.us
Sat May 2 22:32:22 UTC 2009


Hey Pjotr--
I found this which got me quite a long ways --

this is key:
>From KDE-Windows:
>The thing is, cmake separates between "ARCHIVE", "LIBRARY" and "RUNTIME"
>components of targets.
>On Windows, the dll-file is considered a "RUNTIME" component, since it
> should go into the same directory as the executable, and the .lib file is
> considered an ARCHIVE component. On UNIX the .so file is a LIBRARY target,
> a .a file is (obviously) an ARCHIVE target.
>So if you say
>install(TARGETS mylib LIBRARY DESTINATION lib)
>under Windows then you didn't specifiy the destination directories for the
> dll and the lib file, that's why cmake complains.
>So you should do:
>install(TARGETS mylib LIBRARY DESTINATION lib${LIB_SUFFIX}
>                     ARCHIVE DESTINATION lib${LIB_SUFFIX}
>                     RUNTIME DESTINATION bin )
>
>Then it will do the right thing both on Windows and UNIX. If it's inside a
> KDE project, you can also use
>install(TARGETS mylib ${INSTALL_TARGETS_DEFAULT_ARGS} )
>which is a variable set in FindKDE4Internal.cmake, which basically contains
>just these settings.
>
>The simple way would be
>install(TARGETS mylib DESTINATION lib)
>but then Windows users may complain, because the dll won't be in the same
>directory as executables, so they'll have top adjust the PATH to make the
>executables run.

Not quite sure of the source of the original source of this tip (it was quoted 
where I found it), but doing

install ( TARGETS mylib
            LIBRARY DESTINATION lib
            RUNTIME DESTINATION bin )

in all the relevant CMakeLists.txt puts .dlls in the right place--
cheers- MAJ
----- Original Message ----- 
From: "Pjotr Prins" <pjotr.public14 at thebird.nl>
To: "BioLib Project" <biolib-dev at lists.open-bio.org>
Sent: Saturday, May 02, 2009 2:51 PM
Subject: Re: [BioLib-dev] installation on cygwin


>I have merged the BioLib cygwin branch into master - preparing for a
> new release. The major change is the use of modified cmake modules
> which are shared with ASciLib.
>
> The Cygwin tests are still broken. Dynaload.pm complains it can't find
> shared libraries. I have to tell cmake how to find the Cygwin shared
> libs - either due to the different naming convention (.dll) or because
> of some missing linker switches exporting the correct bindings.
>
> It is just a matter of poking around.
>
> Pj.
>
> On Sat, May 02, 2009 at 12:38:30PM +0200, Pjotr Prins wrote:
>> If have cygwin running and a version of example and staden that
>> builds for Perl. Only problem is the test fails to find the dynamic
>> library. I'll fix that soon. Checkout the cygwin branch:
>>
>>   cd biolib
>>   git checkout -b cygwin     # create new branch
>>   git remote add github git://github.com/pjotrp/biolib.git
>>   git pull github cygwin     # pull my branch
>>   ./configure --with-example
>>   make
>>   make test
>>   ./configure --with-staden
>>   make
>>   make test
>>
>> The latest version of biolib has moved the CMake modules into a
>> separate repository - that is shared with ASciLib.
>>
>> The problem you were seeing actually had to do with missing
>> submodules for git. This should be pulled in with configure:
>>
>>   git submodule init
>>   git submodule update
>>
>> Prerequisites for Cygwin are:
>>
>> The BioLib build system supports building on Cygwin
>> (http://www.cygwin.com/). First install Cygwin on your machine
>> selecting the following packages:
>>
>> * cmake   (development)
>> * gcc-g++ (development)
>> * make    (development)
>> * swig    (development)
>> * your preferred language: perl, python and/or ruby
>>
>> and, optionally:
>>
>> * git (to fetch the latest repositories)
>>
>> for ASciLib:
>>
>> * autoconf (development)
>> * automake (development)
>>
>> NOTE: The AffyIO module does not yet work on Cygwin - there is a
>> dependency on the R libraries. I'll sort that soon.
>>
>> See also ./doc/WINDOWS.txt for the latest.
>>
>> On Fri, May 01, 2009 at 02:11:49PM -0400, Mark A. Jensen wrote:
>> > Hey guys,
>> > Am trying to build on cygwin (I know, I know...). Have got cmake. I do
>> >
>> > $ cmake -DBUILD_PERL:BOOLEAN=TRUE .
>> >
>> > in the install directory (biolib-0.0.3), and receive
>> >
>> > -- The C compiler identification is GNU
>> > CMake Error: Could not find cmake module
>> > file:/cygdrive/c/....../biolib-0.0.3/CMakeFiles/CMakeCCompiler.cmake
>> > -- The CXX compiler identification is GNU
>> > CMake Error: Could not find cmake module
>> > file:/cygdrive/c/...../biolib-0.0.3/CMakeFiles/CMakeCXXCompiler.cmake
>> > ...
>> >
>> > Have set CYGWIN=1, CMAKE_INCLUDE_PATH=/usr/share/cmake-2.6.2/include,
>> > CMAKE_MODULE_PATH=/usr/share/cmake-2.6.2/Modules, still no dice. In
>> > /usr/share/cmake-2.6.2/Modules, there exists CMakeCCompiler.cmake.in and
>> > CMakeCXXCompiler.cmake.in, but not
>> > plain .cmake files.
>> >
>> > Any tips appreciated-
>> > cheers Mark
>> >
>> > _______________________________________________
>> > BioLib-dev mailing list
>> > BioLib-dev at lists.open-bio.org
>> > http://lists.open-bio.org/mailman/listinfo/biolib-dev
>> >
>> _______________________________________________
>> BioLib-dev mailing list
>> BioLib-dev at lists.open-bio.org
>> http://lists.open-bio.org/mailman/listinfo/biolib-dev
> _______________________________________________
> BioLib-dev mailing list
> BioLib-dev at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biolib-dev
>
> 




More information about the BioLib-dev mailing list