This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Kdevelop a problem with my include dir(not reckognized)

Tags: None
(comma "," separated)
wotan
Registered Member
Posts
131
Karma
-2
OS
Hi all
Situation:
The Project I am compiling is in
~/Documents/C/Projets/test_of_vector_tools

I got a environment variable (defined in ~/.kde/env) :
Code: Select all
max@netbook:~$ echo $MY_OWN_INCLUDE
/home/max/Documents/C/Include

int this path I have a subdirectoy "lib_kinematic" which contains a CMakeLists.txt that has that
Code: Select all
add_library(point.cpp vector.cpp torsor.cpp vectortools.cpp solidrigid.cpp mechanism.cpp)


In my project in Kdevelop the CMakeLists.txt lookslike that:
Code: Select all
project(test_of_vector_tools)
cmake_minimum_required(VERSION 2.6)
find_package(Qt4 REQUIRED)
# The version number.
set (test_of_vector_tools_VERSION_MAJOR 1)
set (test_of_vector_tools_VERSION_MINOR 0)
#include subdirecotries
include_directories(${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR})
include_directories ("$MY_OWN_INCLUDE/lib_kinematic")
set(test_of_vector_tools_SRCS test_of_vector_tools.cpp main.cpp)
qt4_automoc(${test_of_vector_tools_SRCS})
add_executable(test_of_vector_tools ${test_of_vector_tools_SRCS})
target_link_libraries(test_of_vector_tools $MY_OWN_INCLUDE/lib_kinematic ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})


Questions in the main when I make #include "point.h" it says:
no such file or directory when I try compiling

What am I doing wrong?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
CMake works slightly differently - those ${QT_INCLUDES}, etc come from CMake itself - not the envrionment variables.

Try adjusting CMake to be called with a -DMY_OWN_INCLUDE=/path/to/my/includes/ and it should then work.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
wotan
Registered Member
Posts
131
Karma
-2
OS
Hi thanks for your answer and sorry for the time, I have been quite busy the last days,
Unfortunately it does not work
Code: Select all
cmale -DMY_OWN_INCLUDE=~/Documents/C/Include

will return a
Code: Select all
CMake Warning:
  Manually-specified variables were not used by the project:

    MY_OWN_INCLUDE


Running a make after this will result in a
Code: Select all
No such file or directory

I have also tried a
Code: Select all
make -I=~/Documents/C/Include/lib_kinematic
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Change "$MY_OWN_INCLUDE" to "${MY_OWN_INCLUDE}" to follow the CMake syntax.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft