Hi George,
the file MITK_Poco_Config.cmake is a little bit buggy, as it evaluates
the PROJECT_SOURCE_DIR variable. This leads to your error if the file is
included from another project. The bug is already fixed in the svn
repository.
You can either patch your MITK 0.14 source tree by changing
PROJECT_SOURCE_DIR to MITK_SOURCE_DIR in
<mitk-src>/CMake/MITK_Poco_Config.cmake or add the following statement
right after your "FIND_PACKAGE(MITK REQUIRED)" line:
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${MITK_SOURCE_DIR}/openCherry/CMake)
Best,
Sascha
On 02/02/2010 02:08 PM, g c wrote:
> Hi,
>
> I'm trying to get started building my own applications using MITK. As
> a first step I created the following CMakeList.txt for Step1 of the
> tutorial (see also
> http://www.mail-archive.com/[email protected]/msg00611.html):
>
> ==================
>
> PROJECT(Step1)
>
> CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
> if(COMMAND cmake_policy)
> cmake_policy(SET CMP0003 OLD)
> endif(COMMAND cmake_policy)
>
> FIND_PACKAGE(MITK REQUIRED)
>
> MITK_USE_MODULE(QmitkExt)
> INCLUDE_DIRECTORIES(${ALL_INCLUDE_DIRECTORIES})
>
> FIND_PACKAGE(ITK REQUIRED)
> INCLUDE(${ITK_USE_FILE})
>
> FIND_PACKAGE(Qt4 REQUIRED)
> INCLUDE(${QT_USE_FILE})
> INCLUDE_DIRECTORIES(${QMITK_INCLUDE_DIRS})
> LINK_DIRECTORIES(${QMITK_LINK_DIRECTORIES})
>
> ADD_EXECUTABLE(Step1 Step1.cpp QtTesting.cpp)
> TARGET_LINK_LIBRARIES(Step1 ${QMITK_LIBRARIES} ${QT_LIBRARIES})
>
> ==================
>
> When configuring using CMake 2.8.0, I get the following warning:
>
> ==================
>
> CMake Warning at C:/mitk/mitk-0.14/CMake/MITK_Poco_Config.cmake:3
> (FIND_PACKAGE):
> Could not find module FindPoco.cmake or a configuration file for package
> Poco.
>
> Adjust CMAKE_MODULE_PATH to find FindPoco.cmake or set Poco_DIR to the
> directory containing a CMake configuration file for Poco. The file will
> have one of the following names:
>
> PocoConfig.cmake
> poco-config.cmake
>
> Call Stack (most recent call first):
> C:/mitk/mitk-0.14/CMake/CoreHelpers.cmake:303 (INCLUDE)
> CMakeLists.txt:10 (MITK_USE_MODULE)
>
> ==================
>
> I'm using ITK-3.16.0, VTK-5.4.2, Qt-4.5.3, Visual Studio 8 (2005) on
> 64bit Windows XP.
>
> Although I can compile and run Step1, I would be very interested if
> anyone can tell me how I can improve my CMakeList.txt?
>
> Many thanks,
>
> George
>
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> mitk-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mitk-users
>
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users