trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: March 2012

Why? TDE cmake does NOT respect 'export CMAKE_INCLUDE_PATH=X'

From: "David C. Rankin" <drankinatty@...>
Date: Tue, 13 Mar 2012 21:25:59 -0500
Tim, Serghei,

  When building TDE packages, if the cmake files do not properly find includes,
what is the proper way to tell cmake where the include is? The cmake site says
to use the CMAKE_INCLUDE_PATH environment variable. So I try:

export CMAKE_INCLUDE_PATH=/usr/include/apr-1

  The TDE cmake setup seems to totally ignore this variable:

[  0%] Building CXX object src/svnqt/CMakeFiles/svnqt.dir/apr.cpp.o
cd /build/src/build/src/svnqt && /usr/bin/c++   -Dsvnqt_EXPORTS -DHAVE_CONFIG_H
-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector
--param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2   -DQT_NO_ASCII_CAST
-DQT_CLEAN_NAMESPACE -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION
-DQT_THREAD_SUPPORT -D_REENTRANT -include tqt.h -fPIC
-I/build/src/build/src/svnqt -I/opt/tqt3/include -I/opt/trinity/include/tqt
-I/opt/trinity/include -I/build/src/build -I/build/src/build/src
-I/build/src/tdesvn/src -I/build/src/tdesvn/src/settings
-I/build/src/tdesvn/src/svnqt -I/build/src/tdesvn/src/svnfrontend/graphtree
-I/build/src/tdesvn/src/svnfrontend/fronthelpers
-I/build/src/tdesvn/src/ksvnwidgets -I/build/src/tdesvn/src/helpers
-I/build/src/tdesvn/src/svnfrontend -I/build/src/tdesvn/src/svnqt/cache
-I/usr/include/subversion-1 -I/usr/include/apr-1.0
-I/build/src/tdesvn/src/svnqt/SQLITE_INCLUDE_DIR    -fPIC -o
CMakeFiles/svnqt.dir/apr.cpp.o -c /build/src/tdesvn/src/svnqt/apr.cpp
/build/src/tdesvn/src/svnqt/apr.cpp:32:25: fatal error: apr_general.h: No such
file or directory
compilation terminated.
make[2]: *** [src/svnqt/CMakeFiles/svnqt.dir/apr.cpp.o] Error 1
make[2]: Leaving directory `/build/src/build'
make[1]: *** [src/svnqt/CMakeFiles/svnqt.dir/all] Error 2
make[1]: Leaving directory `/build/src/build'
make: *** [all] Error 2

  My apr_general.h is in /usr/include/apr-1 not in "-I/usr/include/apr-1.0" that
the cmake files include.

  My pkgconfig file for apr is correct as well:

21:19 nirvana:~/tde> cat /usr/lib/pkgconfig/apr-1.pc
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
APR_MAJOR_VERSION=1
includedir=/usr/include/apr-1

Name: APR
Description: The Apache Portable Runtime library
Version: 1.4.5
Libs: -L${libdir} -lapr-${APR_MAJOR_VERSION} -luuid -lrt -lcrypt  -lpthread -ldl
Cflags: -D_REENTRANT -D_GNU_SOURCE  -pthread -I${includedir}

  Where is cmake getting the extra '.0' it tacks on the end of the include path?
How to fix?

-- 
David C. Rankin, J.D.,P.E.