--- /dev/null
+#----------------------------------------------------------------------------
+# USER! : SET THE NAME OF YOUR EXECUTABLE
+# Replace 'MyExe' by the name you want to give your executable.
+# (a good policy is to give the executable the same name that the directory)
+
+#########################
+SET ( EXE_NAME myFierceAppli )
+#########################
+
+#----------------------------------------------------------------------------
+
+#----------------------------------------------------------------------------
+# 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
+#
+# )
+#----------------------------------------------------------------------------
+
+INCLUDE_DIRECTORIES (
+
+# USER! : Add here the directories holding the extra .h files you need
+# e.g.
+ ../../lib/mySampleLib
+
+)
+
+#----------------------------------------------------------------------------
+# DEPENDENCIES (LIBRARIES TO LINK WITH)
+SET ( ${EXE_NAME}_LINK_LIBRARIES
+ # ${crea_LIBRARIES}
+ # ${WXWIDGETS_LIBRARIES}
+ # ${KWWidgets_LIBRARIES}
+ # ${VTK_LIBRARIES}
+ # ${ITK_LIBRARIES}
+ # ${GDCM_LIBRARIES}
+ # ${BOOST_LIBRARIES}
+
+ # USER! : Add here those agmonst the various (?) PROJECT LIBRARIES
+ # you need for the current executable
+ # (If you created only one Library, don't forget it !...)
+
+ mySampleLib
+
+ )
+#----------------------------------------------------------------------------
+
+#----------------------------------------------------------------------------
+# USER! : UNCOMMENT NEXT LINE IF YOU WANT A CONSOLE ON WINDOWS
+# NB : YOUR MAIN MUST BE ADAPTED ALSO
+# SEE THE MACRO CREA_WXMAIN_WITH_CONSOLE IN creaWx.h
+#SET(${EXE_NAME}_CONSOLE TRUE)
+#----------------------------------------------------------------------------
+
+#----------------------------------------------------------------------------
+# CREATES AND INSTALLS THE EXE
+CREA_ADD_EXECUTABLE( ${EXE_NAME} )
+#----------------------------------------------------------------------------
+
+
--- /dev/null
+#include <stdio.h>
+#include "myFierceClass.h"
+#include "myFierceClass2.h"
+#include <iostream> // for std::cout
+int main()
+{
+ printf("..Hi..!\n");
+
+ double u=5.;
+ double v=10.;
+
+ //
+ // dummy example
+ //
+ myFierceClass A;
+ double p1=A.Calculate(u, v);
+ std::cout << "result from myFierceClass :" << p1 << std::endl;
+
+ //
+ // dummy example
+ // with Setters and Getters
+ //
+
+ myFierceClass2 B;
+ B.SetX(u);
+ B.SetY(v);
+ B.Execute();
+ double p2=B.GetPercent();
+ std::cout << "result from myFierceClass2 :" << p2 << std::endl;
+
+ return 0;
+}
# USER! : Set the library name (global one)
- SET(LIBRARY_NAME ___Library_name___here___)
+ SET(LIBRARY_NAME mySampleLib)
+ # SET(LIBRARY_NAME ___Library_name___here___)
SET(LIBRARY_NAME_BASE ${LIBRARY_NAME} )
SET(${LIBRARY_NAME}_INSTALL_FOLDER ${LIBRARY_NAME})
-
+
# USER! : Give the list of your Libraries
-
+
SET(${LIBRARY_NAME}_LIBRARIES
___Your_library_one___here___
___Your_library_two___here___
# USER! : Give the list of directories holding the '.h' and '.txx' to be installed
SET(${LIBRARY_NAME}_BUILD_TREE_RELATIVE_INCLUDE_PATHS
- lib/___Your_include_directory_one___here___
- lib/___Your_include_directory_two___here___
- lib/___Your_include_directory_tree___here___
+ lib/mySampleLib
+ # lib/___Your_include_directory_two___here___
+ # lib/___Your_include_directory_tree___here___
)
# USER! : Hands off, here!
# Invoke the advanced macro
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(MyLib1)
+ ADD_SUBDIRECTORY(mySampleLib)