Re: [CMake] Problems to use TRY_COMPILE

2008-04-04 Thread Bill Hoffman
My mistake, you want something like this: TRY_COMPILE(RESULT ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR}/teste.cpp CMAKE_FLAGS COMPILE_DEFINITIONS -I${QT_INCLUDE_DIR} -I${QT_QTCORE_INCLUDE_DIR} CMAKE_FLAGS "-DLINK_LIBRARIES:STRING=${QT_QTCORE_LIBRARY}" OUTPUT_VARIABLE MY_

Re: [CMake] Problems to use TRY_COMPILE

2008-04-04 Thread Bill Hoffman
Vitor Vasconcelos Araujo Silva wrote: >> TRY_COMPILE(RESULT ${PROJECT_BINARY_DIR} >> >> ${PROJECT_SOURCE_DIR}/teste.cpp >> CMAKE_FLAGS >> COMPILE_DEFINITIONS -I${QT_INCLUDE_DIR} >> -I${QT_QTCORE_INCLUDE_DIR} >> -l${QT_QTCORE_LIBRARY} >> OUTPUT_VARIAB

Re: [CMake] Problems to use TRY_COMPILE

2008-04-04 Thread Vitor Vasconcelos Araujo Silva
Thanks for your answer Bill, I cutted from the example code the LINK_LIBRARIES, sorry. I use the Qt4 macro and I get my application compiled without any problems. FIND_PACKAGE ( Qt4 ) ADD_DEFINITIONS ( ${QT_DEFINITIONS} ) INCLUDE_DIRECTORIES ( ${QT_INC

Re: [CMake] Problems to use TRY_COMPILE

2008-04-03 Thread Alexander Neundorf
On Thursday 03 April 2008, Vitor Vasconcelos Araujo Silva wrote: > Hello guys, > > I'm trying to use the TRY_COMPILE command and I guess I'm probaly > making some mistake or I misunderstood the command. > > My command is this one: > > TRY_COMPILE(RESULT ${PROJECT_BINARY_DIR} > > ${PR

Re: [CMake] Problems to use TRY_COMPILE

2008-04-03 Thread Bill Hoffman
Vitor Vasconcelos Araujo Silva wrote: Hello guys, I'm trying to use the TRY_COMPILE command and I guess I'm probaly making some mistake or I misunderstood the command. My command is this one: TRY_COMPILE(RESULT ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR}/teste.cpp CMAKE_FLAGS CO

[CMake] Problems to use TRY_COMPILE

2008-04-03 Thread Vitor Vasconcelos Araujo Silva
Hello guys, I'm trying to use the TRY_COMPILE command and I guess I'm probaly making some mistake or I misunderstood the command. My command is this one: TRY_COMPILE(RESULT ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR}/teste.cpp CMAKE_FLAGS COMPILE_DEFINITIONS -I${QT_INCLUDE_DIR}