]> Creatis software - creaRigidRegistration.git/blob - lib/CMakeLists.txt
Black box that generates a grid over an image in order to visualize the deformation...
[creaRigidRegistration.git] / lib / CMakeLists.txt
1 #----------------------------------------------------------------------------
2 # SET THE NAME OF YOUR LIBRARY
3 # (Replace 'MyLib' by your own library name)
4
5 #############################
6 SET ( LIBRARY_NAME   TransformLib  )
7 #############################
8
9 #----------------------------------------------------------------------------
10
11 #----------------------------------------------------------------------------
12 # CREATES A USER OPTION IN CMAKE
13 OPTION ( BUILD_${LIBRARY_NAME}  "Build ${LIBRARY_NAME} library ?" ON)
14 #----------------------------------------------------------------------------
15
16 #----------------------------------------------------------------------------
17 IF ( BUILD_${LIBRARY_NAME} )
18 #----------------------------------------------------------------------------
19
20   #----------------------------------------------------------------------------
21   # BUILD LIBRARY
22   #----------------------------------------------------------------------------
23
24   #----------------------------------------------------------------------------
25   # LIBRARY HEADERS (TO BE INSTALLED)
26   # EITHER LIST ALL .h, *.txx IN CURRENT DIR USING NEXT LINE:
27   
28   FILE(GLOB ${LIBRARY_NAME}_HEADERS "*.h" "*.txx")
29   
30   # OR MANUALLY LIST YOUR HEADERS WITH NEXT COMMAND
31   #  SET ( ${LIBRARY_NAME}_HEADERS
32   #
33   #      )
34   #----------------------------------------------------------------------------
35
36   #----------------------------------------------------------------------------
37   # LIBRARY SOURCES (TO BE COMPILED)
38   # EITHER LIST ALL .cxx, *.cpp, *.cc IN CURRENT DIR USING NEXT LINE:
39   
40   FILE(GLOB ${LIBRARY_NAME}_SOURCES *.cxx *.cpp *.cc *.h)
41   
42   # OR MANUALLY LIST YOUR FILES WITH NEXT COMMAND (WITHOUT EXTENSION)
43   #  SET ( ${LIBRARY_NAME}_SOURCES 
44   #   
45   #      )
46   #----------------------------------------------------------------------------
47
48   #----------------------------------------------------------------------------
49   # LIBRARY DEPENDENCIES (LIBRARIES TO LINK WITH)
50   #
51   # Uncomment the Libraries you need
52   #
53   SET ( ${LIBRARY_NAME}_LINK_LIBRARIES
54   #    ${crea_LIBRARIES}
55   #    ${WXWIDGETS_LIBRARIES}
56   #    ${KWWidgets_LIBRARIES}
57   ${VTK_LIBRARIES}
58   #    ${ITK_LIBRARIES}
59   #    ${GDCM_LIBRARIES}
60   #    ${BOOST_LIBRARIES}
61   
62   # If this library must link against other libraries 
63   # Add here any extra Library you need
64   
65       )
66   #----------------------------------------------------------------------------
67
68   #----------------------------------------------------------------------------
69   # MACRO WHICH DOES ALL THE JOB : BUILD AND INSTALL
70   
71   # The default is to create a Dynamic Library.
72   # if you need to create a static library
73   # comment out the following line :
74   
75   #CREA_ADD_LIBRARY( ${LIBRARY_NAME} )
76   
77   # and uncomment the 2 lines hereafter:
78   
79  IF(UNIX)
80     ADD_DEFINITIONS(-fPIC)
81  ENDIF(UNIX)
82   ADD_LIBRARY(${LIBRARY_NAME} STATIC  ${${LIBRARY_NAME}_SOURCES})
83   TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${${LIBRARY_NAME}_LINK_LIBRARIES} )
84   
85   #
86   #----------------------------------------------------------------------------
87
88   #---------------------------------------------------------------------------
89 ENDIF ( BUILD_${LIBRARY_NAME} )