Hi all,I'm compiling a subDirectory ie : ( ${GVTROOTDIR}/src/test ) with this CMakeList.txt :
# get GVTROOT ENV VAR
SET(GVTROOTDIR $ENV{GVTROOT})
# keep all *.cpp files
FILE(GLOB CPPFILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp)
MESSAGE("Fichiers à compiler ${CPPFILES}")
#EXE
SET(TARGET ${GVTROOTDIR}/lib/libTrace.so)
ADD_EXECUTABLE(${TARGET} ${CPPFILES})
#CFLAGS
SET(DEBUG_FLAGS "-g -Wall")
INCLUDE_DIRECTORIES(
${GVTROOTDIR}/src/include )
#LD
SET(LINK_FLAGS "-elf -shared")
#ADD CFLAGS TO TARGET
SET_TARGET_PROPERTIES(${TARGET} PROPERTIES COMPILE_FLAGS "${DEBUG_FLAGS}")
#ADD LDFLAGS TO TARGET
SET_TARGET_PROPERTIES(${TARGET} PROPERTIES LINK_FLAGS "${LINK_FLAGS}")And i got a problem with the INCLUDE_DIRECTORIES and this error message :ADD_SUBDIRECTORY A full source directory was specified that is not in the source tree but no binary directory was specified. If you specify an out of tree source directory then you must provide the binary directory as well.
Any idea how to do it ?And actually, i'm trying to compile a library, so i had "-elf -shared" to the LINK_FLAGS but i don't know if it's the right solution...
Thanks .
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
