]> Creatis software - creaMaracasVisu.git/blob - lib/GUI/Qt/VolumeRenderer/CMakeLists.txt
9c25100a4ed83b5cf8e6618578e85841a1407909
[creaMaracasVisu.git] / lib / GUI / Qt / VolumeRenderer / CMakeLists.txt
1 #----------------------------------------------------------------------------
2 # USER! : SET THE NAME OF YOUR LIBRARY
3 # (Replace 'MyLib' by your own library name)
4
5 #############################
6 SET ( LIBRARY_NAME   GUIQtVolumeRenderer  )
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)
41
42         #SET(qtproject_UIS
43         #    main_window.ui
44         #)
45         FILE(GLOB ${LIBRARY_NAME}_UIS "*.ui")
46
47         QT4_WRAP_UI(${LIBRARY_NAME}_UIS_H ${${LIBRARY_NAME}_UIS})
48         QT4_WRAP_CPP(${LIBRARY_NAME}_SOURCES ${${LIBRARY_NAME}_HEADERS})
49
50         # Don't forget to include output directory, otherwise
51         # the UI file won't be wrapped!
52         
53         #message(FATAL_ERROR ${CMAKE_CURRENT_BINARY_DIR})
54         #include_directories(${QT_QTUITOOLS_INCLUDE_DIR})
55         #Now add these generated files to the ADD_EXECUTABLE step
56         # If this is NOT done, then the ui_*.h files will not be generated
57         #add_executable(qtproject ${qtproject_SRCS} ${qtproject_UIS_H} )
58
59         FILE(GLOB ${LIBRARY_NAME}_HEADERS "*.h" "*.txx" "${PROJECT_BINARY_DIR}/lib/GUI/Qt/VTK/VolumeRenderer/*.h")
60
61
62         set(${LIBRARY_NAME}_SOURCES ${${LIBRARY_NAME}_SOURCES} ${${LIBRARY_NAME}_UIS_H})
63
64         #FILE(GLOB UIS_NAME RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.ui *.qrc)
65         #FOREACH(UISFILE ${UIS_NAME})
66         #  CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${UISFILE} ${CMAKE_BINARY_DIR}/${UISFILE} COPYONLY )
67         #ENDFOREACH(UISFILE)
68
69         
70         #CREA_CPDIR(${INPUT_DATA_DIR} ${OUTPUT_DATA_DIR})
71   # OR MANUALLY LIST YOUR FILES WITH NEXT COMMAND (WITHOUT EXTENSION)
72   #  SET ( ${LIBRARY_NAME}_SOURCES 
73   #   
74   #      )
75   #----------------------------------------------------------------------------
76
77   #----------------------------------------------------------------------------
78   # LIBRARY DEPENDENCIES (LIBRARIES TO LINK WITH)
79   #
80   # USER! : Uncomment the Libraries you need
81   #
82   SET ( ${LIBRARY_NAME}_LINK_LIBRARIES
83   #    ${crea_LIBRARIES}
84   #    ${WXWIDGETS_LIBRARIES}
85   #    ${KWWidgets_LIBRARIES}
86   #   ${VTK_LIBRARIES}
87   #    ${ITK_LIBRARIES}
88   #    ${GDCM_LIBRARIES}
89   #    ${BOOST_LIBRARIES}
90     ${QT_LIBRARIES}
91     QVTK
92 #EED    BaseVolumeRenderer
93   # If this library must link against other libraries 
94   # USER! : Add here any extra Library you need
95
96       )
97 #message(FATAL_ERROR "QT LIBS ${QT_LIBRARIES}")
98   #----------------------------------------------------------------------------
99
100   #----------------------------------------------------------------------------
101   # MACRO WHICH DOES ALL THE JOB : BUILD AND INSTALL
102
103   # USER! : The default is to create a Dynamic Library.
104   # if you need to create a static library
105   # comment out the following line :
106
107   SET(${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_INCLUDE_PATHS include/creaMaracasVisu)
108   SET(${LIBRARY_NAME}_INSTALL_FOLDER creaMaracasVisu)
109   CREA_ADD_LIBRARY( ${LIBRARY_NAME} )
110
111   # and uncomment the 2 lines hereafter:
112
113   # ADD_LIBRARY(${LIBRARY_NAME} STATIC  ${${LIBRARY_NAME}_SOURCES})
114   # TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${${LIBRARY_NAME}_LINK_LIBRARIES} )
115   #
116   #----------------------------------------------------------------------------
117
118   #---------------------------------------------------------------------------
119 ENDIF ( BUILD_${LIBRARY_NAME} )
120