#----------------------------------------------------------------------------
# SET THE NAME OF YOUR EXECUTABLE
+# Replace 'MyExe' by the name you want to give your executable.
+# (a good plicy is to give the executable the same name that the directory)
+
+#########################
SET ( EXE_NAME MyExe )
+#########################
+
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
# EXECUTABLE SOURCES (TO BE COMPILED)
# EITHER LIST ALL .cxx, *.cpp, *.cc IN CURRENT DIR USING NEXT LINE:
+
FILE(GLOB ${EXE_NAME}_SOURCES *.cxx *.cpp *.cc)
+
# OR MANUALLY LIST YOUR FILES WITH NEXT COMMAND (WITHOUT EXTENSION)
# SET ( ${EXE_NAME}_SOURCES
#
# ${GDCM_LIBRARIES}
# ${BOOST_LIBRARIES}
- # Add here those agmonst the various (?) PROJECT LIBRARIES you need
- # for the current executable
- # (If there is only one, don't forget it !)
+ # Add here those agmonst the various (?) PROJECT LIBRARIES
+ # you need for the current executable
+ # (If you created only one Library, don't forget it !...)
)
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
# SET THE NAME OF YOUR LIBRARY
+# (Replace 'MyLib' by your own library name)
+
+#############################
SET ( LIBRARY_NAME MyLib )
+#############################
+
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
# LIBRARY HEADERS (TO BE INSTALLED)
# EITHER LIST ALL .h, *.txx IN CURRENT DIR USING NEXT LINE:
+
FILE(GLOB ${LIBRARY_NAME}_HEADERS "*.h" "*.txx")
+
# OR MANUALLY LIST YOUR HEADERS WITH NEXT COMMAND
# SET ( ${LIBRARY_NAME}_HEADERS
#
- # )
+ # )
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
# LIBRARY SOURCES (TO BE COMPILED)
# EITHER LIST ALL .cxx, *.cpp, *.cc IN CURRENT DIR USING NEXT LINE:
+
FILE(GLOB ${LIBRARY_NAME}_SOURCES *.cxx *.cpp *.cc)
+
# OR MANUALLY LIST YOUR FILES WITH NEXT COMMAND (WITHOUT EXTENSION)
# SET ( ${LIBRARY_NAME}_SOURCES
#
- # )
+ # )
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
# LIBRARY DEPENDENCIES (LIBRARIES TO LINK WITH)
+ #
+ # Uncomment the Libraries you need
+ #
SET ( ${LIBRARY_NAME}_LINK_LIBRARIES
- ${crea_LIBRARIES}
- # ${WXWIDGETS_LIBRARIES}
- # ${VTK_LIBRARIES}
- # ${ITK_LIBRARIES}
- # ${GDCM_LIBRARIES}
- # ${BOOST_LIBRARIES}
- )
+ # ${crea_LIBRARIES}
+ # ${WXWIDGETS_LIBRARIES}
+ # ${KWWidgets_LIBRARIES}
+ # ${VTK_LIBRARIES}
+ # ${ITK_LIBRARIES}
+ # ${GDCM_LIBRARIES}
+ # ${BOOST_LIBRARIES}
+
+ # If this library must link against other libraries
+ # Add here any extra Library you need
+
+ )
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
# MACRO WHICH DOES ALL THE JOB : BUILD AND INSTALL
+
+ # The default is to create a Dynamic Library.
+ # if you need to create a static library
+ # comment out the following line :
+
CREA_ADD_LIBRARY( ${LIBRARY_NAME} )
+
+ # and uncomment the 2 lines hereafter:
+
+ # ADD_LIBRARY(${LIBRARY_NAME} STATIC ${${LIBRARY_NAME}_SOURCES})
+ # TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${${LIBRARY_NAME}_LINK_LIBRARIES} )
+
+ #
#----------------------------------------------------------------------------
#---------------------------------------------------------------------------