#ADD_DEFINITIONS( -DPROJECT_VERSION_DATE=${PROJECT_VERSION_DATE} )
#==================================
-
+SET(CREA_VERBOSE_CMAKE TRUE)
#==================================
# Find crea (mandatory, to use macros)
-SET(CREA_VERBOSE_CMAKE TRUE)
FIND_PACKAGE(crea REQUIRED)
IF (crea_FOUND)
INCLUDE(${crea_USE_FILE})
ENDIF(crea_FOUND)
#==================================
+# USER! Add here as many 'FIND_PACKAGE' blocks as *your* aplication requires
+#FIND_PACKAGE(xxx REQUIRED)
+#IF (xxx_FOUND)
+# INCLUDE(${xxx_USE_FILE})
+#ENDIF(xxx_FOUND)
+
#==================================
# Do not allow to build inside the source tree
CREA_PREVENT_IN_SOURCE_BUILD()
#==================================
SET(LIBNAME $(PROJECT_NAME))
+
INCLUDE_DIRECTORIES(
${PROJECT_BINARY_DIR}
+ )
+
+ # USER! Add here the directories holding the .h you need
+ # INCLUDE_DIRECTORIES(appli/_YOUR_OWN_APPLI_SOURCE_DIRECTORY_)
+ # INCLUDE_DIRECTORIES(lib/_YOUR_OWN_LIBRARY_SOURCE_DIRECTORY_)
- # // if the previous one is not enough : (JPRx)
- # Add here the directories holding the .h you need
-
- # ${PROJECT_SOURCE_DIR}/lib/_YOUR_OWN_LIBRARY_SOURCE_DIRECTORY_
-
- )
#==================================
SUBDIRS(lib)
SUBDIRS(appli)
SUBDIRS(doc)
+SUBDIRS(data)
SUBDIRS(install)
#==================================
+USER! Put here your module name.
<your Module>
-(c) CREATIS 2009
\ No newline at end of file
+(c) CREATIS 2009
-# Add a SUBDIRS command for each one of your applications
+# USER! : Add a SUBDIRS command for each one of your applications
# SUBDIRS(MyApp1)
# SUBDIRS(MyApp2)
-# Add a SUBDIRS command for each one of your libraries
+# Settings for macro CREA_ADVANCED_INSTALL_LIBRARY_FOR_CMAKE :
+
+# USER! : Set the library name (global one)
+
+ 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___
+ ___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/___Your_include_directory_one___here___
+ lib/___Your_include_directory_two___here___
+ lib/___Your_include_directory_tree___here___
+ )
+
+# 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} )
+ FILE(RELATIVE_PATH
+ CILFC_EXECUTABLE_OUTPUT_REL_PATH
+ ${PROJECT_BINARY_DIR} ${EXECUTABLE_OUTPUT_PATH})
+ ENDIF ( ${PROJECT_BINARY_DIR} STREQUAL ${EXECUTABLE_OUTPUT_PATH} )
+
+ IF(UNIX)
+ SET(${LIBRARY_NAME}_BUILD_TREE_RELATIVE_LIBRARY_PATHS
+ ${CILFC_EXECUTABLE_OUTPUT_REL_PATH})
+ SET(${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_LIBRARY_PATHS lib)
+ ELSE(UNIX)
+ SET(${LIBRARY_NAME}_BUILD_TREE_RELATIVE_LIBRARY_PATHS
+ ${CILFC_EXECUTABLE_OUTPUT_REL_PATH})
+ SET(${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_LIBRARY_PATHS bin)
+ ENDIF(UNIX)
+ SET(${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_INCLUDE_PATHS include/${LIBRARY_NAME})
+
+ # Invoke the advanced macro
+ CREA_ADVANCED_INSTALL_LIBRARY_FOR_CMAKE(${LIBRARY_NAME})
+
+# USER! : Up to you again, now!
+
+# USER! : Add a SUBDIRS command for each one of your libraries
# SUBDIRS(MyLib1)
+
#----------------------------------------------------------------------------
-# SET THE NAME OF YOUR LIBRARY
+# USER! : SET THE NAME OF YOUR LIBRARY
# (Replace 'MyLib' by your own 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
#----------------------------------------------------------------------------
# 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
+ # USER! : Uncomment the Libraries you need
#
SET ( ${LIBRARY_NAME}_LINK_LIBRARIES
# ${crea_LIBRARIES}
# ${ITK_LIBRARIES}
# ${GDCM_LIBRARIES}
# ${BOOST_LIBRARIES}
-
+
# If this library must link against other libraries
- # Add here any extra Library you need
-
+ # USER! : Add here any extra Library you need
+
)
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
# MACRO WHICH DOES ALL THE JOB : BUILD AND INSTALL
-
- # The default is to create a Dynamic Library.
+
+ # USER! : 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} )
-
+
#
#----------------------------------------------------------------------------