Commit 33a8a2e4 authored by saubatn's avatar saubatn
Browse files

ADD : file Subprojects.cmake is automatically created at configuration step in...

ADD : file Subprojects.cmake is automatically created at configuration step in the build directory and stores the list of subprojects to be used by Nightly scripts.
It allows to loop over each subprojects to build it.
FIX : added camitkcore subproject (missing, as target is not declared in CamiTKMacro.cmake file).

git-svn-id: svn+ssh://scm.forge.imag.fr/var/lib/gforge/chroot/scmrepos/svn/camitk/trunk/camitk@204 ec899d31-69d1-42ba-9299-647d76f65fb3
parent ddbad714
...@@ -976,6 +976,7 @@ endmacro() ...@@ -976,6 +976,7 @@ endmacro()
macro(initXmlSubProject) macro(initXmlSubProject)
set(CAMITK_XML_PROJECT_DESCRIPTION "<Project name=\"CamiTK\">" CACHE INTERNAL "") set(CAMITK_XML_PROJECT_DESCRIPTION "<Project name=\"CamiTK\">" CACHE INTERNAL "")
set(CAMITK_SUBPROJECTS "" CACHE INTERNAL "")
endmacro() endmacro()
...@@ -1002,6 +1003,7 @@ macro(addSubProject target) ...@@ -1002,6 +1003,7 @@ macro(addSubProject target)
# Add it to the list of different nodes # Add it to the list of different nodes
set(CAMITK_XML_PROJECT_DESCRIPTION ${CAMITK_XML_PROJECT_DESCRIPTION} ${xml_subproject} CACHE INTERNAL "") set(CAMITK_XML_PROJECT_DESCRIPTION ${CAMITK_XML_PROJECT_DESCRIPTION} ${xml_subproject} CACHE INTERNAL "")
set(CAMITK_SUBPROJECTS ${CAMITK_SUBPROJECTS} ${target} CACHE INTERNAL "")
endmacro() endmacro()
...@@ -1017,10 +1019,17 @@ endmacro() ...@@ -1017,10 +1019,17 @@ endmacro()
# DIR: The path to the directory where to store the xml data file # DIR: The path to the directory where to store the xml data file
macro(validateXmlSubProjects dir) macro(validateXmlSubProjects dir)
# Write down the Project.xml file
set(CAMITK_XML_PROJECT_DESCRIPTION ${CAMITK_XML_PROJECT_DESCRIPTION} "\n</Project>") set(CAMITK_XML_PROJECT_DESCRIPTION ${CAMITK_XML_PROJECT_DESCRIPTION} "\n</Project>")
set(filename "${dir}/Project.xml") set(filename "${dir}/Project.xml")
file(WRITE ${filename} ${CAMITK_XML_PROJECT_DESCRIPTION}) file(WRITE ${filename} ${CAMITK_XML_PROJECT_DESCRIPTION})
message(STATUS "Generated: ${filename}") message(STATUS "Generated ${filename} for project description")
#Write down subprojects.cmake filename
message(ERROR, "validateXmlSubProjects >> CAMITK_SUBPROJECTS = ${CAMITK_SUBPROJECTS}")
set(filename "${dir}/Subprojects.cmake")
file(WRITE ${filename} "set(CAMITK_SUBPROJECTS ${CAMITK_SUBPROJECTS})")
message(STATUS "Generated ${filename} for subprojects listing")
endmacro() endmacro()
......
...@@ -30,6 +30,9 @@ set(CAMITKCORE_LIBRARY_PROPERTIES ${CAMITKCORE_LIBRARY_PROPERTIES} ...@@ -30,6 +30,9 @@ set(CAMITKCORE_LIBRARY_PROPERTIES ${CAMITKCORE_LIBRARY_PROPERTIES}
# can have their own copy of CAMITK_CORE_LIB, which will generates loads of problems # can have their own copy of CAMITK_CORE_LIB, which will generates loads of problems
# because of the Singleton design pattern and various factory bits in CAMITK_CORE_LIB. # because of the Singleton design pattern and various factory bits in CAMITK_CORE_LIB.
add_library(${CAMITK_CORE_LIB} SHARED ${${CAMITK_CORE_LIB}_SOURCES}) add_library(${CAMITK_CORE_LIB} SHARED ${${CAMITK_CORE_LIB}_SOURCES})
# Update XML Project description adding this target as a subproject of the main CamiTK project with
# its dependencies (in the CMake target point of view)
addSubProject(${CAMITK_CORE_LIB})
# set the library specific info (SONAME...) # set the library specific info (SONAME...)
set_target_properties(${CAMITK_CORE_LIB} PROPERTIES ${CAMITKCORE_LIBRARY_PROPERTIES} LINK_INTERFACE_LIBRARIES "") set_target_properties(${CAMITK_CORE_LIB} PROPERTIES ${CAMITKCORE_LIBRARY_PROPERTIES} LINK_INTERFACE_LIBRARIES "")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment