1 #----------------------------------------------------------------------------
2 # USER! : SET THE NAME OF YOUR LIBRARY
3 # (Replace 'MyLib' by your own library name)
5 #############################
6 SET ( LIBRARY_NAME KernelSurfaceRenderer )
7 #############################
9 #----------------------------------------------------------------------------
11 #----------------------------------------------------------------------------
12 # CREATES A USER OPTION IN CMAKE
13 OPTION ( BUILD_${LIBRARY_NAME} "Build ${LIBRARY_NAME} library ?" ON)
14 #----------------------------------------------------------------------------
16 #----------------------------------------------------------------------------
17 IF ( BUILD_${LIBRARY_NAME} )
18 #----------------------------------------------------------------------------
20 #----------------------------------------------------------------------------
22 #----------------------------------------------------------------------------
24 #----------------------------------------------------------------------------
25 # LIBRARY HEADERS (TO BE INSTALLED)
26 # EITHER LIST ALL .h, *.txx IN CURRENT DIR USING NEXT LINE:
28 FILE(GLOB ${LIBRARY_NAME}_HEADERS "*.h" "*.txx")
30 # OR MANUALLY LIST YOUR HEADERS WITH NEXT COMMAND
31 # SET ( ${LIBRARY_NAME}_HEADERS
34 #----------------------------------------------------------------------------
36 #----------------------------------------------------------------------------
37 # LIBRARY SOURCES (TO BE COMPILED)
38 # EITHER LIST ALL .cxx, *.cpp, *.cc IN CURRENT DIR USING NEXT LINE:
40 FILE(GLOB ${LIBRARY_NAME}_SOURCES *.cxx *.cpp *.cc )
42 set(${LIBRARY_NAME}_SOURCES ${${LIBRARY_NAME}_SOURCES} ${${LIBRARY_NAME}_HEADERS})
47 #FILE(GLOB ${LIBRARY_NAME}_UIS "*.ui")
49 #QT4_WRAP_UI(${LIBRARY_NAME}_UIS_H ${${LIBRARY_NAME}_UIS})
50 #QT4_WRAP_CPP(${LIBRARY_NAME}_SOURCES ${${LIBRARY_NAME}_HEADERS})
52 # Don't forget to include output directory, otherwise
53 # the UI file won't be wrapped!
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} )
61 #set(${LIBRARY_NAME}_SOURCES ${${LIBRARY_NAME}_SOURCES} ${${LIBRARY_NAME}_UIS_H})
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 )
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
74 #----------------------------------------------------------------------------
76 #----------------------------------------------------------------------------
77 # LIBRARY DEPENDENCIES (LIBRARIES TO LINK WITH)
79 # USER! : Uncomment the Libraries you need
81 SET ( ${LIBRARY_NAME}_LINK_LIBRARIES
83 # ${WXWIDGETS_LIBRARIES}
84 # ${KWWidgets_LIBRARIES}
91 # If this library must link against other libraries
92 # USER! : Add here any extra Library you need
95 #message(FATAL_ERROR "QT LIBS ${QT_LIBRARIES}")
96 #----------------------------------------------------------------------------
98 #----------------------------------------------------------------------------
99 # MACRO WHICH DOES ALL THE JOB : BUILD AND INSTALL
101 # USER! : The default is to create a Dynamic Library.
102 # if you need to create a static library
103 # comment out the following line :
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)
110 # and uncomment the 2 lines hereafter:
112 # ADD_LIBRARY(${LIBRARY_NAME} STATIC ${${LIBRARY_NAME}_SOURCES})
113 # TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${${LIBRARY_NAME}_LINK_LIBRARIES} )
115 #----------------------------------------------------------------------------
117 #---------------------------------------------------------------------------
118 ENDIF ( BUILD_${LIBRARY_NAME} )