[CMake] problem using Apache Portable Runtime (APR)
Alexander Neundorf
a.neundorf-work at gmx.net
Mon Apr 21 19:26:09 EDT 2008
On Saturday 19 April 2008, Wakan wrote:
> Alexander Neundorf ha scritto:
> On Thursday 17 April 2008, Carlo Loiudice wrote:
>
> I'm trying to write a simple hello world program using APR.
> I'm using Eclipse + Mingw + Cmake on Windows platform, but I need to
> develop a cross platform application.
> When compiling, the object file was created, but there're linking problem
> that I don't know how to resolve.
>
> The project directory tree is:
> c:\workspace\spok3 (here's the source file spok.cpp and the CMakeLists.txt)
> c:\workspace\spok3\build (the cmake build dir)
> c:\workspace\spok3\apr
> c:\workspace\spok3\apr\include
> c:\workspace\spok3\apr\bin (dll files like libapr-1.dll)
> c:\workspace\spok3\apr\library (.lib files like libapr-1.lib...I don't know
> the difference with libapr-1.dll)
> In CMakeLists.txt when cmake finds:
>
> FIND_PATH(APR_INCLUDE_DIR NAMES C:/workspace/spok3/apr/include/apr.h )
>
>
> Does
> FIND_PATH(APR_INCLUDE_DIR NAMES apr.h PATHS C:/workspace/spok3/apr/include
> ) work ?
>
> Alex
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
> It seems that
>
> FIND_PATH(APR_INCLUDE_DIR NAMES apr.h PATHS C:/workspace/spok3/apr/include
> ) doesn't work because ${APR_INCLUDE_DIR} contains
> APR_INCLUDE_DIR-NOTFOUND I don't know how to test if the function FIND_PATH
> works fine...
> I'm sure of the presence of apr.h in the path
> C:/workspace/spok3/apr/include... But FIND_PATH says that can't find it...
Did you try the command I posted ?
FIND_PATH(APR_INCLUDE_DIR NAMES apr.h PATHS C:/workspace/spok3/apr/include)
It really should work.
Which cmake do you use ?
You have to use the native windows version, I think the cygwin cmake will not
work for mingw.
Alex
More information about the CMake
mailing list