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