LabPlot builds and runs with kf5
Marko Käning
mk-lists at email.de
Sun Mar 1 20:31:33 UTC 2015
Hi Alexander,
On 01 Mar 2015, at 21:05 , Alexander Semke <Alexander.Semke at web.de> wrote:
> I don't exactly understand this. Where did you add those dependencies?
that’s added to KDE’s CI system’s build metadata. (This doesn’t affect you
locally, but perhaps if someone wants to use kdesrc-build with labplot or
move the project onto Jenkins eventually.)
Once I get labplot to build on OSX/CI I will commit these changes to KDE’s
build metadata repo.
>> What can be done to let CMake find GSL properly?
> Have a look at the file CMakeLists.txt. There are sections there like
> FIND_LIBRARY(GSL_LIBRARIES gsl
> PATHS
> /usr/lib
> /usr/local/lib
> )
> FIND_LIBRARY (GSL_CBLAS_LIBRARIES gslcblas
> PATHS
> /usr/lib
> /usr/local/lib
> )
> FIND_PATH (GSL_INCLUDE_DIR gsl_multimin.h
> /usr/include/gsl
> /usr/local/include/gsl
> )
> FIND_PROGRAM (GSL_CONFIG gsl-config
> /usr/bin
> /usr/local/bin
> )
>
> Just add the path /opt/local/lib etc. here.
OK, but it would be better, if CMake knew, that it could search for the libs
in the prefix specified via "-DCMAKE_PREFIX_PATH=/opt/local” like this:
---
$ git diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8f367e6..968c1a4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,19 +38,23 @@ FIND_LIBRARY(GSL_LIBRARIES gsl
PATHS
/usr/lib
/usr/local/lib
+ ${CMAKE_PREFIX_PATH}/lib
)
FIND_LIBRARY (GSL_CBLAS_LIBRARIES gslcblas
PATHS
/usr/lib
/usr/local/lib
+ ${CMAKE_PREFIX_PATH}/lib
)
FIND_PATH (GSL_INCLUDE_DIR gsl_multimin.h
/usr/include/gsl
/usr/local/include/gsl
+ ${CMAKE_PREFIX_PATH}/include/gsl
)
FIND_PROGRAM (GSL_CONFIG gsl-config
/usr/bin
/usr/local/bin
+ ${CMAKE_PREFIX_PATH}/bin
)
IF (GSL_CONFIG)
EXEC_PROGRAM (${GSL_CONFIG} ARGS "--version" OUTPUT_VARIABLE gsl_version)
---
Don’t know whether this is the preferred way to achieve what I intend to get.
Anyway, doing this I got much further, but then ran into this:
---
Building CXX object src/CMakeFiles/labplot2.dir/kdefrontend/SettingsGeneralPage.cpp.o
In file included from /Users/marko/WC/KDECI-builds/kf5-qt5/labplot/src/kdefrontend/GuiObserver.cpp:32:
/Users/marko/WC/KDECI-builds/kf5-qt5/labplot/src/backend/core/AbstractAspect.h:106:21: error: use 'template' keyword to treat 'children' as a dependent template name
result << i->children<T>(flags);
^
template
---
Is this due to the use of clang on my end?
Greets,
Marko
More information about the kde-edu
mailing list