From: jean-pierre roux Date: Mon, 11 Apr 2011 21:09:49 +0000 (+0000) Subject: Comments X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=9c2bcebc593fcd6cfe34d01993d229a39ff9991e;p=crea.git Comments --- diff --git a/appli/creaNewProject/NewProject/CMakeLists.txt.in b/appli/creaNewProject/NewProject/CMakeLists.txt.in index 1805099..2fc38a8 100644 --- a/appli/creaNewProject/NewProject/CMakeLists.txt.in +++ b/appli/creaNewProject/NewProject/CMakeLists.txt.in @@ -49,6 +49,7 @@ ENDIF(crea_FOUND) #================================== # USER! : Add here as many 'FIND_PACKAGE' blocks as *your* aplication requires +# ----- # WARNING : we are talking here about 'bbtk packages', not about libraries! # if your project just requires the GDCM library, and not bbtk/packages/gdcm, @@ -69,6 +70,8 @@ CREA_PREVENT_IN_SOURCE_BUILD() # Libraries/tools used # USER! : Note : Set USE_CREA to ON +# ----- + # if you need to LINK against crea # (and not only use its macros) SET(USE_CREA OFF) @@ -122,7 +125,8 @@ ENDIF(WIN32) ${PROJECT_BINARY_DIR} ) - # USER! : Add here the directories holding the .h you need + # USER! : Add here the directories holding the .h you need + 3 # INCLUDE_DIRECTORIES(appli/_YOUR_OWN_APPLI_SOURCE_DIRECTORY_) # INCLUDE_DIRECTORIES(lib/_YOUR_OWN_LIBRARY_SOURCE_DIRECTORY_) @@ -140,6 +144,8 @@ SET(BBTK_DOC_BUILD_PATH ) #================================== # USER! : Hands off! +# ---- + # ADD SUB DIRECTORIES # ---------------- ADD_SUBDIRECTORY(lib) @@ -152,8 +158,12 @@ ADD_SUBDIRECTORY(install) #----------------------------------- # This one is just a sample. # USER : you may comment out this line +# ---- + ADD_SUBDIRECTORY(bbtk_mySamplePackage_PKG) + #================================== # This one is the default empty package, # created with the same name than the Project. # USER : you may use it +# ---- diff --git a/appli/creaNewProject/NewProject/lib/CMakeLists.txt b/appli/creaNewProject/NewProject/lib/CMakeLists.txt index 5d46bdb..76511e0 100644 --- a/appli/creaNewProject/NewProject/lib/CMakeLists.txt +++ b/appli/creaNewProject/NewProject/lib/CMakeLists.txt @@ -1,6 +1,7 @@ # Settings for macro CREA_ADVANCED_INSTALL_LIBRARY_FOR_CMAKE : # USER! : Set the library name (global one) +# ----- SET(LIBRARY_NAME mySampleLib) # SET(LIBRARY_NAME ___Library_name___here___) @@ -10,13 +11,14 @@ # USER! : Give the list of your Libraries SET(${LIBRARY_NAME}_LIBRARIES - ___Your_library_one___here___ - ___Your_library_two___here___ - ___Your_library_tree___here___ + # ___Your_library_one___here___ + # ___Your_library_two___here___ + # ___Your_library_tree___here___ ) # USER! : Give the list of directories holding the '.h' and '.txx' to be installed +# ----- SET(${LIBRARY_NAME}_BUILD_TREE_RELATIVE_INCLUDE_PATHS lib/mySampleLib @@ -25,7 +27,7 @@ SET(${LIBRARY_NAME}_LIBRARIES ) # USER! : Hands off, here! - +# ----- IF ( ${PROJECT_BINARY_DIR} STREQUAL ${EXECUTABLE_OUTPUT_PATH} ) SET(CILFC_EXECUTABLE_OUTPUT_REL_PATH ".") ELSE ( ${PROJECT_BINARY_DIR} STREQUAL ${EXECUTABLE_OUTPUT_PATH} ) @@ -49,7 +51,8 @@ SET(${LIBRARY_NAME}_LIBRARIES CREA_ADVANCED_INSTALL_LIBRARY_FOR_CMAKE(${LIBRARY_NAME}) # USER! : Up to you again, now! - +# ----- # USER! : Add a ADD_SUBDIRECTORY command for each one of your libraries +# ----- ADD_SUBDIRECTORY(mySampleLib) diff --git a/appli/creaNewProject/NewProject/lib/mySampleLib/myFierceClass.cxx b/appli/creaNewProject/NewProject/lib/mySampleLib/myFierceClass.cxx index 29b3b2b..b57eca1 100644 --- a/appli/creaNewProject/NewProject/lib/mySampleLib/myFierceClass.cxx +++ b/appli/creaNewProject/NewProject/lib/mySampleLib/myFierceClass.cxx @@ -3,6 +3,6 @@ double /*CREA_EXPORT*/ myFierceClass::Calculate(double a, double b) { - return (a/b)*100; + return (a-b)*100; } diff --git a/appli/creaNewProject/NewProject/lib/mySampleLib/myFierceClass2.cxx b/appli/creaNewProject/NewProject/lib/mySampleLib/myFierceClass2.cxx index d5f2825..617b179 100644 --- a/appli/creaNewProject/NewProject/lib/mySampleLib/myFierceClass2.cxx +++ b/appli/creaNewProject/NewProject/lib/mySampleLib/myFierceClass2.cxx @@ -13,6 +13,7 @@ void myFierceClass2::SetY (double y) void myFierceClass2::Execute() { Result=X+Y+2; + } double myFierceClass2::GetResult() diff --git a/appli/creaNewProject/NewProject/lib/mySampleLib/myFierceClass2.h b/appli/creaNewProject/NewProject/lib/mySampleLib/myFierceClass2.h index 92a1914..6f35d76 100644 --- a/appli/creaNewProject/NewProject/lib/mySampleLib/myFierceClass2.h +++ b/appli/creaNewProject/NewProject/lib/mySampleLib/myFierceClass2.h @@ -13,8 +13,8 @@ class /*CREA_EXPORT*/ myFierceClass2 myFierceClass2() : X(0.0), Y(0.0), Result(0.0) {}; myFierceClass2(int a, int b) : X (a), Y(b) {}; ~myFierceClass2(){}; - void SetX (double x); - void SetY (double x); + void SetX (double x); + void SetY (double y); void Execute(); double GetResult();