]> Creatis software - crea.git/commitdiff
Add usefull comments
authorjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Thu, 16 Jul 2009 10:25:06 +0000 (10:25 +0000)
committerjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Thu, 16 Jul 2009 10:25:06 +0000 (10:25 +0000)
appli/creaNewProject/NewProject/CMakeLists.txt.in
appli/creaNewProject/NewProject/appli/template_appli/CMakeLists.txt
appli/creaNewProject/NewProject/lib/template_lib/CMakeLists.txt

index 302131f291428cacfb55200fb8a38bc370395e1e..759ddc52768e61234f45de61967e1f8d425cba3a 100644 (file)
@@ -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)
 
 ###################################
index 783c94f8d427d23781ba04c316103a859aa2e07f..33ee0868a39f1c85fd0d35e7ed65ebc60a155e44 100644 (file)
@@ -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 !...
   
   )
 #----------------------------------------------------------------------------
index a604b1d2ab8d54ea8df6590d046b3f1c4f6ee486..2b4217020c017ccd8d885fef0b83c2fca2b3ba29 100644 (file)
@@ -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} )
+  
+  #
   #----------------------------------------------------------------------------
 
   #---------------------------------------------------------------------------