Hi,

What about adding: find_package(ITK REQUIRED)

If you use ITKv4, you could change:
  TARGET_LINK_LIBRARIES(test ITKCommon ITKIO ITKBasicFilters)
into
  TARGET_LINK_LIBRARIES(test ${ITK_LIBRARIES})

As a best practice, you could use lower case for the CMake function and
command.

Hth
Jc


On Wed, Apr 24, 2013 at 2:00 PM, Gabriel Santiago <
santiago.eletr...@gmail.com> wrote:

> Actually, this is the content of my CMakeLists.txt:
>
>
> project(test)
>
> cmake_minimum_required(VERSION 2.4.0)
>
> find_package(Qt4 REQUIRED)
>
> SET(qtproject_UIS mainwindow.ui)
>
> QT4_WRAP_UI(qtproject_UIS_H ${qtproject_UIS})
>
> include_directories(${CMAKE_
> CURRENT_BINARY_DIR})
>
> add_executable(test ${qtproject_SRCS} ${qtproject_UIS_H} main.cpp)
>
> TARGET_LINK_LIBRARIES(test ITKCommon ITKIO ITKBasicFilters)
>
>
> On 24 April 2013 14:58, Frédéric Aime <fa...@janua.fr> wrote:
>
>> Hi,
>>
>> it should be useful to have a look to your CmakeList.txt file to find
>> out, feel free to post
>>
>> Cheers
>>
>>
>> [image: Logo] <http://www.janua.fr/images/LogoSignature.gif>
>> *Frédéric AIME*
>> fa...@janua.fr
>> Gsm:  +33(0) 675 842 059
>> Tél:    +33(0) 483 508 291
>> Fax:   +33(0)955 260 370
>> http://www.janua.fr
>>     
>> <https://plus.google.com/u/0/b/100246637918846333913/100246637918846333913/posts>
>>     <http://www.scoop.it/t/janua>   <http://www.scoop.it/t/janua/rss.xml>
>>
>>
>>
>> 2013/4/23 Gabriel Santiago <santiago.eletr...@gmail.com>
>>
>>>  Dear all,
>>>
>>> I am trying to create an user interface for some medical image
>>> processing using Qt (it must be Qt) and I want to use ITK to do some of the
>>> image processing.
>>>
>>> In order to create the CMakeLists.txt, I am following this tutorial:
>>>
>>> http://qtnode.net/wiki/Qt4_with_cmake
>>>
>>> Everything goes fine when I hit "Configure" with CMake-GUI. All the
>>> fields of QT are filled and no problems are found. but when I try to
>>> "Generate" the files, I get the following message:
>>>
>>> CMake Error: CMake can not determine linker language for target:Test
>>>
>>> CMake Error: Cannot determine link language for target "Test".
>>>
>>> I guess that CMake doens't find the "programming language" that I want
>>> to use. Am I right? In any case, how can I solve this problem?
>>>
>>> Could someone, please, provide me some CMakeFiles complete example for
>>> this case?
>>>
>>> Thank you all in advance,
>>>
>>> --
>>> Gabriel Santiago
>>>
>>> ~"As long as I live so long do I learn"~
>>> Ramakhrishna
>>>
>>> --
>>>
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the CMake FAQ at:
>>> http://www.cmake.org/Wiki/CMake_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.cmake.org/mailman/listinfo/cmake
>>>
>>
>>
>
>
> --
> Gabriel Santiago
>
> ~"As long as I live so long do I learn"~
> Ramakhrishna
>
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>



-- 
+1 919 869 8849
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to