From: jean-pierre roux Date: Thu, 16 Jul 2009 10:25:06 +0000 (+0000) Subject: Add usefull comments X-Git-Tag: EED.02Oct2009~10 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=6046bb273fb32c833eb5d90aa8c856339a8d6df7;p=crea.git Add usefull comments --- diff --git a/appli/creaNewProject/NewProject/CMakeLists.txt.in b/appli/creaNewProject/NewProject/CMakeLists.txt.in index 302131f..759ddc5 100644 --- a/appli/creaNewProject/NewProject/CMakeLists.txt.in +++ b/appli/creaNewProject/NewProject/CMakeLists.txt.in @@ -1,3 +1,12 @@ +# --------------------------------- +# +# Unless you are an experimented cmake user, +# have a look at : +# http://www.creatis.insa-lyon.fr/creatools/GettingStarted_creaTools +# before starting. +# +# --------------------------------- + CMAKE_MINIMUM_REQUIRED(VERSION 2.6) ################################### diff --git a/appli/creaNewProject/NewProject/appli/template_appli/CMakeLists.txt b/appli/creaNewProject/NewProject/appli/template_appli/CMakeLists.txt index 783c94f..33ee086 100644 --- a/appli/creaNewProject/NewProject/appli/template_appli/CMakeLists.txt +++ b/appli/creaNewProject/NewProject/appli/template_appli/CMakeLists.txt @@ -1,12 +1,20 @@ #---------------------------------------------------------------------------- # 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 # @@ -24,9 +32,9 @@ SET ( ${EXE_NAME}_LINK_LIBRARIES # ${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 !...) ) #---------------------------------------------------------------------------- diff --git a/appli/creaNewProject/NewProject/lib/template_lib/CMakeLists.txt b/appli/creaNewProject/NewProject/lib/template_lib/CMakeLists.txt index a604b1d..2b42170 100644 --- a/appli/creaNewProject/NewProject/lib/template_lib/CMakeLists.txt +++ b/appli/creaNewProject/NewProject/lib/template_lib/CMakeLists.txt @@ -1,6 +1,11 @@ #---------------------------------------------------------------------------- # SET THE NAME OF YOUR LIBRARY +# (Replace 'MyLib' by your own library name) + +############################# SET ( LIBRARY_NAME MyLib ) +############################# + #---------------------------------------------------------------------------- #---------------------------------------------------------------------------- @@ -19,38 +24,62 @@ IF ( BUILD_${LIBRARY_NAME} ) #---------------------------------------------------------------------------- # 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} ) + + # #---------------------------------------------------------------------------- #---------------------------------------------------------------------------