[Cmake] Specifying static or dynamic linking of external libraries?

Thomas Deschamps tdeschamps at lbl.gov
Tue Oct 22 18:17:57 EDT 2002


-> CMake-1.4.5, I've installed it yesterday.
Here is the content of my CMakeList.txt:
---------------------------------------------------------------------------------
PROJECT(calWidgets)
INCLUDE(${CMAKE_ROOT}/Modules/FindOpenGL.cmake)
INCLUDE_DIRECTORIES(
    /usr/local/include
    /usr/local/include/vtk )

LINK_LIBRARIES(
        /usr/local/lib/libvtkftgl.a
        /usr/local/lib/libvtkfreetype.a
        /usr/local/lib/libvtkCommon.a
        /usr/local/lib/libvtkFiltering.a
        /usr/local/lib/libvtkGraphics.a
        /usr/local/lib/libvtkHybrid.a
        /usr/local/lib/libvtkImaging.a
        /usr/local/lib/libvtkIO.a
        /usr/local/lib/libvtkRendering.a
        ${CMAKE_X_LIBS}
        ${CMAKE_THREAD_LIBS} )

SOURCE_FILES(Project_sources
    myImagePlaneWidget.cxx
    myImageViewer.cxx )

ADD_LIBRARY(calWidgets STATIC Project_sources)
ADD_EXECUTABLE(testImagePlaneWidget Project_sources test.cxx)
---------------------------------------------------------------------------------

William A. Hoffman wrote:

> What version of cmake are you using?
>
> -Bill 






More information about the CMake mailing list