[CMake] CMAKE error when I add my own library

irene gonzalvez irenegonzalvezg at yahoo.es
Tue Apr 1 04:07:48 EDT 2008


Dear CMake-users,

I have been modifying one of the libraries of ITK for including it in my project, but I have found a problem because the CMake doesn't create the file .lib, so I cannot build the project using the Visual Studio 2005 without any error. In the souce project of my folder, I have a subfolder called: Library which contains the .txx and .h files.
 

PROJECT(myProject)

FIND_PACKAGE(ITK)
IF(ITK_FOUND)
  INCLUDE(${USE_ITK_FILE})
ENDIF(ITK_FOUND)

INCLUDE_DIRECTORIES(${myProject_SOURCE_DIR}/Library) 

LINK_DIRECTORIES (${myProject_BINARY_DIR}/Library)
 
ADD_LIBRARY (myfunctions Library/itkBinaryBallStructuringElement_modified.txx)

SET_TARGET_PROPERTIES(myfunctions PROPERTIES LINKER_LANGUAGE C) 
//without the previous line I obtained the following error in the CMake: CMake cannot determine linker language for target
 
ADD_EXECUTABLE (myProject myProject.cxx)

TARGET_LINK_LIBRARIES (myProject ITKCommon ITKIO myfunctions )

Thanks in advance for your help
Best regards
Irene

       
---------------------------------

Enviado desde Correo Yahoo!
Disfruta de una bandeja de entrada más inteligente..
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080401/4d83dba3/attachment.htm>


More information about the CMake mailing list