[Insight-users] Problem with CMakelist
Wen Shi
wsa18 at sfu.ca
Fri Nov 6 20:01:23 EST 2009
Hi Guys,
I am new to CMake and have little experiences in writing CMakelist files.
Currently I want to generate a project which calls VXL libraries.
Below is my CMakelist file:
CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW)
ENDIF(COMMAND CMAKE_POLICY)
PROJECT(Hello)
FIND_PACKAGE(VXL REQUIRED)
IF(VXL_FOUND)
INCLUDE_DIRECTORIES(${VXL_USE_FILE})
ENDIF(VXL_FOUND)
ADD_EXECUTABLE(Hello Hello.cpp)
TARGET_LINK_LIBRARIES(Hello vbl vcsl vgl vgui vidl vidl1 vidl_vil1 vil vil1 vnl vpl vsl vul)
My Hello.cpp is as follows:
// Include standard C++ input/output library
#include <vcl_iostream.h>
// main is the first function to be called
int main()
{
// send string "hello world" to the standard
// output stream cout.
vcl_cout << "Hello world\n";
// Must return something from main
return 0;
}
I used CMake to generate the project files and there is no problems.
But When try to run the project, I always receive the error:
can't find the include file or directory 'vcl_iostream.h'.
I am wondering if some of you can point out the errors.
Thanks a lot
Wen Shi
More information about the Insight-users
mailing list