Hi and thanks filipe,
ADD_SUBDIRECTORY(src/common/share/folder1)
ADD_SUBDIRECTORY(...)
or
SET(REPERTOIRES src/common/share/folder1 ...)
FOREACH(folder ${REPERTOIRES})
ADD_SUBDIRECTORY(${folder})
ENDFOREACH(folder)
for each one of these directories you have to create a CMakeLists.txt
with commands to compile your sources (ADD_EXECUTABLE or ADD_LIBRARY)
------------------------------------------------------------------------
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake
I tried what you said with a simple example of mine.
1> on my folder root :
PROJECT(Test) #ProjetctName
# to see command line of gcc
SET(CMAKE_VERBOSE_MAKEFILE 1)
# to add Color on CMake Process
SET(CMAKE_COLOR_MAKEFILE ON)
SET(REPERTOIRES
/[...]/root/test )
FOREACH(folder ${REPERTOIRES})
ADD_SUBDIRECTORY(${folder})
ENDFOREACH(folder)
2> on [..]root/test :
INCLUDE(FindOpenSG.cmake)
# check if osg-config was found
IF(OPENSG_FOUND)
SET(CMAKE_CXX_FLAGS "${OPENSG_CXX_FLAGS}")
LINK_DIRECTORIES(${OPENSG_LINK_DIRECTORIES})
ADD_EXECUTABLE(test testCubeTexture.cpp) #Executable and file(s) to
compile
TARGET_LINK_LIBRARIES(test ${OPENSG_LIBRARIES})
ELSE(OPENSG_FOUND)
MESSAGE(STATUS "Cannot find osg-config anywhere on the system. Please
put the file into your path or specify it in CMAKE_OSG_CONFIG.")
ENDIF(OPENSG_FOUND)
But i got this error :
CMake Error: Error required internal CMake variable not set, cmake may
be not be built correctly.
Missing variable is:
CMAKE_SIZEOF_VOID_P
And CMAKE_INSTALL_PREFIX is ok
Any idea ?
begin:vcard
fn;quoted-printable:Xavier Larrod=C3=A9
n;quoted-printable:Larrod=C3=A9;Xavier
org:IRISA ;E119 Orange
title:Projet GVT
tel;work:73 28
version:2.1
end:vcard
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake