[CMake] problem with include directories
Leila baghdadi
baghdadi at sickkids.ca
Mon Dec 13 09:25:49 EST 2004
Hi Sergio,
I think what you want to do ( at least that is what I did) is to only
set .c or .cpp files as source and then use
INCLUDE_DIRECTORIES(dir1 dir2 ...)
and just specify the directories with the header files,
HTH
Leila
On Mon, 2004-12-13 at 07:08, Sergio Andrés wrote:
> Hi all,
>
> I have a problem with the include directories.
> I have generated a project for MSVC 6.0 with CMake but the list of
> include dirs is incomplete.
>
> I don't know if there is a limit for inlcude dirs or something like this..
>
> My CMakeLists is attached to this email.
>
> Thanks in advance.
>
> Sergio.
>
> ______________________________________________________________________
>
> PROJECT (GIMIA)
>
>
> SET (SOURCE_DIR ${GIMIA_SOURCE_DIR}/src)
>
> # -----------------------------
> # sources
> # -----------------------------
> SET(SRCS
>
> ${SOURCE_DIR}/MainFrm.cpp
> ${SOURCE_DIR}/MainFrm.h
>
> ${SOURCE_DIR}/Resource.h
>
> ${SOURCE_DIR}/StdAfx.cpp
> ${SOURCE_DIR}/StdAfx.h
>
> ${SOURCE_DIR}/SliceVTKData.cpp
> ${SOURCE_DIR}/SliceVTKData.h
>
> ${SOURCE_DIR}/3DView.cpp
> ${SOURCE_DIR}/3DView.h
>
> ${SOURCE_DIR}/MontageView.cpp
> ${SOURCE_DIR}/MontageView.h
>
> ${SOURCE_DIR}/PlaneView.cpp
> ${SOURCE_DIR}/PlaneView.h
>
>
> ${SOURCE_DIR}/RenderView.cpp
> ${SOURCE_DIR}/RenderView.h
>
> ${SOURCE_DIR}/SliceView.cpp
> ${SOURCE_DIR}/SliceView.h
>
> ${SOURCE_DIR}/TabbedView.cpp
> ${SOURCE_DIR}/TabbedView.h
>
> ${SOURCE_DIR}/SlicePhaseSelectionView.cpp
> ${SOURCE_DIR}/SlicePhaseSelectionView.h
>
>
> ${SOURCE_DIR}/VisualizationApp.cpp
> ${SOURCE_DIR}/VisualizationApp.h
> ${SOURCE_DIR}/VisualizationApp.clw
> ${SOURCE_DIR}/VisualizationApp.rc
>
> ${SOURCE_DIR}/Document.cpp
> ${SOURCE_DIR}/Document.h
>
> ${SOURCE_DIR}/VTKImageSet.cpp
> ${SOURCE_DIR}/VTKImageSet.h
>
> ${SOURCE_DIR}/StudyView.cpp
> ${SOURCE_DIR}/StudyView.h
>
> ${SOURCE_DIR}/VisualizationView.cpp
> ${SOURCE_DIR}/VisualizationView.h
>
> ${SOURCE_DIR}/SparseView.cpp
> ${SOURCE_DIR}/SparseView.h
>
> ${SOURCE_DIR}/CheckListBox.cpp
> ${SOURCE_DIR}/CheckListBox.h
>
> ${SOURCE_DIR}/ResultsView.cpp
> ${SOURCE_DIR}/ResultsView.h
>
> ${SOURCE_DIR}/IAModelView.cpp
> ${SOURCE_DIR}/IAModelView.h
>
> ${SOURCE_DIR}/IAModelDocument.cpp
> ${SOURCE_DIR}/IAModelDocument.h
>
>
> ${SOURCE_DIR}/CenterWidthDialogBar.cpp
> ${SOURCE_DIR}/CenterWidthDialogBar.h
>
> ${SOURCE_DIR}/LookupTableDialogBar.cpp
> ${SOURCE_DIR}/LookupTableDialogBar.h
>
> ${SOURCE_DIR}/PatientTreeDialog.cpp
> ${SOURCE_DIR}/PatientTreeDialog.h
>
> ${SOURCE_DIR}/StudyDataDialogBar.cpp
> ${SOURCE_DIR}/StudyDataDialogBar.h
>
> # /IAModel
> # --------------------------------
> ${SOURCE_DIR}/IAModel/ASM3DSampleProfilesGenerator.cpp
> ${SOURCE_DIR}/IAModel/ASM3DSampleProfilesGenerator.h
>
> ${SOURCE_DIR}/IAModel/ASMIAModel3DBuilder.cpp
> ${SOURCE_DIR}/IAModel/ASMIAModel3DBuilder.h
>
> # /res
> # --------------------
> ${SOURCE_DIR}/res/Toolbar.bmp
> ${SOURCE_DIR}/res/VisualizationAppMDI.ico
> ${SOURCE_DIR}/res/VisualizationAppMDI.rc2
> ${SOURCE_DIR}/res/VisualizationAppMDI.ico
>
> ${SOURCE_DIR}/res/heart_re.ico
> ${SOURCE_DIR}/res/heart_te.ico
> ${SOURCE_DIR}/res/icon_sel.ico
> ${SOURCE_DIR}/res/lv_endo.ico
> ${SOURCE_DIR}/res/lv_epi.ico
>
> ${SOURCE_DIR}/res/addShape.ico
> ${SOURCE_DIR}/res/deleteShape.ico
>
>
>
> ${SOURCE_DIR}/Observer.cpp
> ${SOURCE_DIR}/Observer.h
> ${SOURCE_DIR}/Subject.cpp
> ${SOURCE_DIR}/Subject.h
>
> ${SOURCE_DIR}/VTKUtils.h
> ${SOURCE_DIR}/VTKUtils.cpp
>
> ${SOURCE_DIR}/Contour.cpp
> ${SOURCE_DIR}/Contour.h
>
> ${SOURCE_DIR}/ContourPloter.cpp
> ${SOURCE_DIR}/ContourPloter.h
>
> ${SOURCE_DIR}/GSView.cpp
> ${SOURCE_DIR}/GSView.h
>
> ${SOURCE_DIR}/mathEx.cpp
> ${SOURCE_DIR}/mathEx.h
> )
>
>
>
> #------------------------------------------------------------
> # dependencies:
> #------------------------------------------------------------
>
>
> #------------------------------------------------------------
> # BaseLib includes and libs dirs
> #------------------------------------------------------------
> #FIND_PACKAGE(BaseLib)
> # IF(BaseLib_FOUND)
> # INCLUDE(${BaseLib_USE_FILE})
> #ELSE(BaseLib_FOUND)
> # MESSAGE(FATAL_ERROR Please set BaseLib_DIR.")
> #ENDIF(BaseLib_FOUND)
>
>
> #------------------------------------------------------------
> # SMoLib includes and libs dirs
> #------------------------------------------------------------
> FIND_PACKAGE(SMoLib)
> IF(SMoLib_FOUND)
> INCLUDE(${SMoLib_USE_FILE})
> ELSE(SMoLib_FOUND)
> MESSAGE(FATAL_ERROR Please set SMoLib_DIR.")
> ENDIF(SMoLib_FOUND)
>
>
> # ------------------------------------------
> # ITK includes and libs directories
> # ------------------------------------------
>
> FIND_PACKAGE(ITK)
> IF(ITK_FOUND)
> INCLUDE(${ITK_USE_FILE})
> ELSE(ITK_FOUND)
> MESSAGE(FATAL_ERROR Please set ITK_DIR.")
> ENDIF(ITK_FOUND)
>
> LINK_LIBRARIES(${ITK_LIBRARIES})
>
>
> # -----------------------------
> # VTK includes and libs directories
> # -----------------------------
> INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake)
> IF (USE_VTK_FILE)
> INCLUDE(${USE_VTK_FILE})
> ENDIF (USE_VTK_FILE)
>
>
> # -----------------------------
> # VTK libs
> # -----------------------------
> SET (VTK_LIBS
> vtkRendering
> vtkGraphics
> vtkHybrid
> vtkImaging
> vtkIO
> vtkFiltering
> vtkCommon
> vtkDICOMParser
> )
>
>
> # BASELIB_LIBRARIES
> SET (BASELIB_LIBS
> blCommon
> blImage
> blImageUtilities
> blUtilities
> )
>
> # SMOLIB_LIBRARIES
> SET (SMOLIB_LIBS
> smlPDModel
> )
>
>
> LINK_LIBRARIES(${VTK_LIBS} ${BASELIB_LIBS} ${SMOLIB_LIBS} )
>
>
>
> # add stuff to use MFC in this executable
> ADD_DEFINITIONS(-D_AFXDLL)
> SET(CMAKE_MFC_FLAG 2)
> ADD_EXECUTABLE(GIMIA WIN32 ${SRCS})
>
>
> ______________________________________________________________________
>
> _______________________________________________
> CMake mailing list
> CMake at www.cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
More information about the CMake
mailing list