Re: [CMake] CMake is unable to find QtCore!

2012-08-13 Thread Toronto Andrew

Andreas Pakulat-2 wrote
> 
> Hi,
> 
> Relocating Qt requires either patching the qmake binary or installing
> a qt.conf file to help qmake find the libs in the new position. The
> absolute include/lib dirs are hardcoded into qmake when its being
> built. See http://doc.qt.nokia.com/4.7/qt-conf.html for the
> file-format
> 
> -> *First off, I really appreciate you looking at my build errors. 
> 
> Patching the qmake binary? I reinstalled the 4.8.2 binary, why is this not
> enough? Of course, I will write a qt-conf file I am unable to correct my
> building environment.*
> 
>> FindQt4 now actually finds 4.8.2 as opposed to 4.8.0, however
>> some flags like QT_USE_FILE and QT_QTGUI_LIBRARY seem to still point at
>> 4.8.0 prompting some linker issues during the build.
> 
> Does that mean you didn't move Qt this time?
> 
> -> *Well, I have both Qt versions withing the same directory (C:/Qt/4.8.0
> as well as C:/Qt/4.8.2), and while qmake seems to be configured properly
> for 4.8.2, I feel like it is the flags I mentioned earlier that point at
> 4.8.0, however, I could be mistaken. I figured this out
> *
>> http://cmake.3232098.n2.nabble.com/file/n7581165/8Mj17.png
>>
>> Just for reference, the CMakeLists is found  http://pastie.org/4466367
>> here
>> if need be.
> 
> Did you start with a clean cache? The screenshot suggests you're
> trying to mix debug and release Qt libraries, thats a very bad idea
> anyways (QtOpenGLdd and QtGui4 are mentioned). So maybe things are
> still not picked up as you think they are? The cache-file should have
> more information.
> 
> And you should get rid of LINK_DIRECTORIES, thats not a good idea and
> almost always the wrong fix to whatever linking problems you have.
> CMake find-modules are supposed to setup the absolute path to
> libraries in the variables they 'export', which can be used with
> target_link_libraries directly. Same goes for the 'link_libraries'
> call for MacOSX I'd say.
> 
> Andreas
> 
> *I did start with a clean cache. I see what is happening with the
> debug/release libraries, but do you know what might have caused this?
> There is nothing in the CMakeLists file that seems like it may be causing
> it. Could it be a way the other libraries are built (VTK ?)
> 
> I will avoid using LINK_DIRECTORIES and optimize the CMakeLists file, will
> post back if there is progress.  *
> --
> 
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
> 




--
View this message in context: 
http://cmake.3232098.n2.nabble.com/CMake-is-unable-to-find-QtCore-tp7581149p7581176.html
Sent from the CMake mailing list archive at Nabble.com.
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CMake is unable to find QtCore!

2012-08-13 Thread Toronto Andrew
Haha spot on mate. 

I did so. To rectify, I reinstalled VTK and CMake, fixed the PATH var and
the QTDIR. FindQt4 now actually finds 4.8.2 as opposed to 4.8.0, however
some flags like QT_USE_FILE and QT_QTGUI_LIBRARY seem to still point at
4.8.0 prompting some linker issues during the build. 

http://cmake.3232098.n2.nabble.com/file/n7581165/8Mj17.png 

Just for reference, the CMakeLists is found  http://pastie.org/4466367 here 
if need be.



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/CMake-is-unable-to-find-QtCore-tp7581149p7581165.html
Sent from the CMake mailing list archive at Nabble.com.
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CMake is unable to find QtCore!

2012-08-12 Thread Toronto Andrew
Yes to both John, I did point the CMake gui to the position of the qmake.exe
within the bin, and it does come with whatever DLLs the source comes with. 

I am using Qt 4.8.0 and the latest CMake gui for Windows (x86).

Some other things to get out of the way: 
QTDIR is set to C:/Qt/4.8.0/bin, and this directory has been added to the
list of PATH variables...



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/CMake-is-unable-to-find-QtCore-tp7581149p7581154.html
Sent from the CMake mailing list archive at Nabble.com.
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] CMake is unable to find QtCore!

2012-08-12 Thread Toronto Andrew
I get the following errors when trying to build my Qt project: 

CMake Error at C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/FindQt4.cmake:595 (MESSAGE):
  Could NOT find QtCore.  Check

And I need to manually point the CMake gui in the direction of qmake.exe;
additionally, I receive these flags: QT_QTCORE_LIBRARY_DEBUG-NOTFOUND,
QT_QTCORE_LIBRARY_RELEASE-NOTFOUND and QT_MKSPECS_DIR-NOTFOUND, and I  am
unsure about how to get FindQt4.cmake to work properly.

Thanks in advance!



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/CMake-is-unable-to-find-QtCore-tp7581149.html
Sent from the CMake mailing list archive at Nabble.com.
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CMake does not find an header file, and ignores the classes found in several other header files.

2012-08-05 Thread Toronto Andrew
Roike! I finally got it to run with a bit of manual linker error fixing!

I`ve one more question though: 

CMake Warning at CMakeLists.txt:51 (ADD_EXECUTABLE):
  Cannot generate a safe linker search path for target CppSampleQt01 because
  there is a cycle in the constraint graph:

dir 0 is [-DEIGEN_USE_NEW_STDVECTOR]
dir 1 is [-DEIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET]
dir 2 is [-DBOOST_ALL_NO_LIB]
dir 3 is [-DFLANN_STATIC]
dir 4 is [ /arch:SSE2]
dir 5 is [C:/Qt/lib]
  dir 13 must precede it due to link library [QtOpenGL4.lib]
dir 6 is [C:/Program Files (x86)/PCL 1.6.0/3rdParty/Boost/lib]
dir 7 is [C:/Program Files (x86)/PCL 1.6.0/lib]
dir 8 is [C:/Program Files (x86)/OpenNI/Lib]
dir 9 is [C:/Program Files (x86)/PCL 1.6.0/3rdParty/VTK/lib/vtk-5.8]
dir 10 is [C:/Program Files (x86)/PCL 1.6.0/3rdParty/FLANN/lib]
dir 11 is [C:/Program Files (x86)/PCL 1.6.0/3rdParty/Qhull/lib]
dir 12 is [C:/SimplonSample2/lib]
dir 13 is [C:/Qt/4.8.0/lib]
  dir 5 must precede it due to link library [QtGui4.lib]

  Some of these libraries may not be found correctly.


CMake Warning at CMakeLists.txt:51 (ADD_EXECUTABLE):
  Cannot generate a safe linker search path for target CppSampleQt01 because
  there is a cycle in the constraint graph:

dir 0 is [-DEIGEN_USE_NEW_STDVECTOR]
dir 1 is [-DEIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET]
dir 2 is [-DBOOST_ALL_NO_LIB]
dir 3 is [-DFLANN_STATIC]
dir 4 is [ /arch:SSE2]
dir 5 is [C:/Qt/lib]
  dir 13 must precede it due to link library [QtOpenGLd4.lib]
dir 6 is [C:/Program Files (x86)/PCL 1.6.0/3rdParty/Boost/lib]
dir 7 is [C:/Program Files (x86)/PCL 1.6.0/lib]
dir 8 is [C:/Program Files (x86)/OpenNI/Lib]
dir 9 is [C:/Program Files (x86)/PCL 1.6.0/3rdParty/VTK/lib/vtk-5.8]
dir 10 is [C:/Program Files (x86)/PCL 1.6.0/3rdParty/FLANN/lib]
dir 11 is [C:/Program Files (x86)/PCL 1.6.0/3rdParty/Qhull/lib]
dir 12 is [C:/SimplonSample2/lib]
dir 13 is [C:/Qt/4.8.0/lib]
  dir 5 must precede it due to link library [QtGui4.lib]

  Some of these libraries may not be found correctly.


CMake Warning at CMakeLists.txt:51 (ADD_EXECUTABLE):
  Cannot generate a safe linker search path for target CppSampleQt01 because
  there is a cycle in the constraint graph:

dir 0 is [-DEIGEN_USE_NEW_STDVECTOR]
dir 1 is [-DEIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET]
dir 2 is [-DBOOST_ALL_NO_LIB]
dir 3 is [-DFLANN_STATIC]
dir 4 is [ /arch:SSE2]
dir 5 is [C:/Qt/lib]
  dir 13 must precede it due to link library [QtOpenGLd4.lib]
dir 6 is [C:/Program Files (x86)/PCL 1.6.0/3rdParty/Boost/lib]
dir 7 is [C:/Program Files (x86)/PCL 1.6.0/lib]
dir 8 is [C:/Program Files (x86)/OpenNI/Lib]
dir 9 is [C:/Program Files (x86)/PCL 1.6.0/3rdParty/VTK/lib/vtk-5.8]
dir 10 is [C:/Program Files (x86)/PCL 1.6.0/3rdParty/FLANN/lib]
dir 11 is [C:/Program Files (x86)/PCL 1.6.0/3rdParty/Qhull/lib]
dir 12 is [C:/SimplonSample2/lib]
dir 13 is [C:/Qt/4.8.0/lib]
  dir 5 must precede it due to link library [QtGui4.lib]

This stuff pops up when I try to include VTK and PCL as well, and I`m not
sure how to deal, any thoughts?

PROJECT(CppSampleQt01)

FIND_PACKAGE(PCL 1.3 REQUIRED)
FIND_PACKAGE(Qt4 REQUIRED)

FIND_LIBRARY(SIMPLONLIB lv.simplon lib)
FIND_LIBRARY(SIMPLONIMGPROC lv.simplon.imgproc lib)

SET(CppSampleQt01_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/include/lv.simplon.class.cpp camera.cpp main.cpp
mainwindow.cpp osdep.cpp paint.cpp)
SET(CppSampleQt01_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/include/lv.simplon.class.h camera.h mainwindow.h
osdep.h paint.h)
SET(CppSampleQt01_RESOURCES icons.qrc)

SET(QExtSerialPort_HEADERS QExtSerialPort/src/qextwineventnotifier_p.h 

QExtSerialPort/src/qextserialport_p.h 

QExtSerialPort/src/qextserialport_global.h 

QExtSerialPort/src/qextserialport.h 

QExtSerialPort/src/qextserialenumerator_p.h 

QExtSerialPort/src/qextserialenumerator.h)
SET(QExtSerialPort_SOURCES QExtSerialPort/src/qextserialenumerator.cpp
QExtSerialPort/src/qextserialport.cpp

QExtSerialPort/src/qextwineventnotifier_p.cpp)

if (WIN32)
#Check syntax for this. QExt... may need to be wrapped in parentheses. 
LIST(APPEND QExtSerialPort_SOURCES
QExtSerialPort/src/qextserialport_win.cpp) 
#SET(QExtSerialPort_SOURCES ${QExtSerialPort_SOURCES}
QExtSerialPort/src/qextserialport_win.cpp)
#  add_definitions(-DWINVER=0x0501) # needed for mingw (dbt business??
LINK_LIBRARIES(${QT_QTGUI_LIBRARY} setupapi advapi32 user32)
endif(WIN32)

if (UNIX)
LIST(APPEND QE

Re: [CMake] CMake does not find an header file, and ignores the classes found in several other header files.

2012-08-04 Thread Toronto Andrew
Hello, thank you for looking at my CMake issues! I really appreciate it :)

I fixed the major issue you mentioned (Moving INCLUDE_DIRECTORIES above
ADD_EXECUTABLE), however this did not seem to fix anything. I still got the
errors I was receiving prior to that change, and I used absolute paths when
linking to the include directory within my source. 

I fixed this *qextserialport\src\moc_qextserialport.cpp(10): fatal error
C1083: Cannot open include file: '../../../src/qextserialport.h': No such
file or directory. * by linking to the absolute path in
moc_qextserialport.cpp, which seemed to get rid of it, however it draws up
these now: 

*2>build\x\QExtSerialPort\src\moc_qextserialport.cxx(97): error C2027: use
of undefined type 'QextSerialPortPrivate'
2>  QExtSerialPort/src/qextserialport.h(167) : see declaration of
'QextSerialPortPrivate'
2>build\x\QExtSerialPort\src\moc_qextserialport.cxx(97): error C2227: left
of '->_q_canRead' must point to class/struct/union/generic type*

All these errors stem from a class in qextserialport_p.h (Recall:
QExtSerialPort/src/qextserialport_p.h(0): Note: No relevant classes found.
No output generated. still shows up),

So I guess the question is still how do I get the compiler to read these
files? And why is it not reading them? 

This is how the CMakeLists.txt file looks as it is right now:


*PROJECT(CppSampleQt01)
FIND_PACKAGE(Qt4 REQUIRED)

FIND_LIBRARY(SIMPLONLIB lv.simplon lib)
FIND_LIBRARY(SIMPLONIMGPROC lv.simplon.imgproc lib)

SET(CppSampleQt01_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/include/lv.simplon.class.cpp camera.cpp main.cpp
mainwindow.cpp osdep.cpp paint.cpp)
SET(CppSampleQt01_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/include/lv.simplon.class.h camera.h mainwindow.h
osdep.h paint.h)
SET(CppSampleQt01_RESOURCES icons.qrc)

SET(QExtSerialPort_HEADERS QExtSerialPort/src/qextwineventnotifier_p.h 

QExtSerialPort/src/qextserialport_p.h 

QExtSerialPort/src/qextserialport_global.h 

QExtSerialPort/src/qextserialport.h 

QExtSerialPort/src/qextserialenumerator_p.h 

QExtSerialPort/src/qextserialenumerator.h)
SET(QExtSerialPort_SOURCES QExtSerialPort/src/qextserialenumerator.cpp
QExtSerialPort/src/qextserialport.cpp

QExtSerialPort/src/qextwineventnotifier_p.cpp)

if (WIN32)
#Check syntax for this. QExt... may need to be wrapped in parentheses. 
LIST(APPEND QExtSerialPort_SOURCES
QExtSerialPort/src/qextserialport_win.cpp) 
#SET(QExtSerialPort_SOURCES ${QExtSerialPort_SOURCES}
QExtSerialPort/src/qextserialport_win.cpp)
#  add_definitions(-DWINVER=0x0501) # needed for mingw (dbt business??
LINK_LIBRARIES(${QT_QTGUI_LIBRARY} setupapi advapi32 user32)
endif(WIN32)

if (UNIX)
LIST(APPEND QExtSerialPort_SOURCES
QExtSerialPort/src/qextserialport_unix.cpp)
endif (UNIX)

if (OSX)
LINK_LIBRARIES(framework IOKit)
LIST(APPEND QExtSerialPort_SOURCES
QExtSerialPort/src/qextserialport_osx.cpp)
endif (OSX)

QT4_WRAP_CPP(CppSampleQt01_HEADERS_MOC ${CppSampleQt01_HEADERS}
${QExtSerialPort_HEADERS})

INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})


INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/include QExtSerialPort/src)
ADD_EXECUTABLE(CppSampleQt01 ${CppSampleQt01_SOURCES}
${QExtSerialPort_SOURCES}
${CppSampleQt01_HEADERS_MOC}
${CppSampleQt01_RESOURCES_RCC})

TARGET_LINK_LIBRARIES(CppSampleQt01 ${QT_LIBRARIES} ${SIMPLONLIB}
${SIMPLONIMGPROC})
*

Once again, thank you guys!



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/CMake-does-not-find-an-header-file-and-ignores-the-classes-found-in-several-other-header-files-tp7581066p7581076.html
Sent from the CMake mailing list archive at Nabble.com.
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] CMake does not find an header file, and ignores the classes found in several other header files.

2012-08-03 Thread Toronto Andrew
The following is my CMakeLists file:

PROJECT(CppSampleQt01)
FIND_PACKAGE(Qt4 REQUIRED)

FIND_LIBRARY(SIMPLONLIB lv.simplon lib)
FIND_LIBRARY(SIMPLONIMGPROC lv.simplon.imgproc lib)

SET(CppSampleQt01_SOURCES include/lv.simplon.class.cpp camera.cpp main.cpp
mainwindow.cpp osdep.cpp paint.cpp)
SET(CppSampleQt01_HEADERS include/lv.simplon.class.h camera.h mainwindow.h
osdep.h paint.h)
SET(CppSampleQt01_RESOURCES icons.qrc)

SET(QExtSerialPort_HEADERS QExtSerialPort/src/qextwineventnotifier_p.h 

QExtSerialPort/src/qextserialport_p.h 

QExtSerialPort/src/qextserialport_global.h 

QExtSerialPort/src/qextserialport.h 

QExtSerialPort/src/qextserialenumerator_p.h 

QExtSerialPort/src/qextserialenumerator.h)
SET(QExtSerialPort_SOURCES QExtSerialPort/src/qextserialenumerator.cpp
QExtSerialPort/src/qextserialport.cpp

QExtSerialPort/src/qextwineventnotifier_p.cpp)

if (WIN32)
SET(QExtSerialPort_SOURCES ${QExtSerialPort_SOURCES}
QExtSerialPort/src/qextserialport_win.cpp)
#  add_definitions(-DWINVER=0x0501) # needed for mingw (dbt business??
LINK_LIBRARIES(${QT_QTGUI_LIBRARY} setupapi advapi32 user32)
endif(WIN32)

if (UNIX)
SET(QExtSerialPort_SOURCES ${QExtSerialPort_SOURCES}
QExtSerialPort/src/qextserialport_unix.cpp)
endif (UNIX)

if (OSX)
LINK_LIBRARIES(framework IOKit)
SET(QExtSerialPort_SOURCES ${QExtSerialPort_SOURCES}
QExtSerialPort/src/qextserialport_osx.cpp)
endif (OSX)

QT4_WRAP_CPP(CppSampleQt01_HEADERS_MOC ${CppSampleQt01_HEADERS}
${QExtSerialPort_HEADERS})

INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})

ADD_EXECUTABLE(CppSampleQt01 ${CppSampleQt01_SOURCES}
${QExtSerialPort_SOURCES}
${CppSampleQt01_HEADERS_MOC}
${CppSampleQt01_RESOURCES_RCC})

TARGET_LINK_LIBRARIES(CppSampleQt01 ${QT_LIBRARIES} ${SIMPLONLIB}
${SIMPLONIMGPROC})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} include QExtSerialPort/src)

And within the QExtSerialPort/src folder you find all the files under
QExtSerialPort_HEADERS and SOURCES.
However, I get these: 

QExtSerialPort/src/qextserialport_p.h(0): Note: No relevant classes found.
No output generated.
//This does contain a class' declarations.
QExtSerialPort/src/qextserialport_global.h(0): Note: No relevant classes
found. No output generated.
//This too contains a class' declarations.
QExtSerialPort/src/qextserialenumerator_p.h(0): Note: No relevant classes
found. No output generated.
//Same thing.

qextserialport\src\moc_qextserialport.cpp(10): fatal error C1083: Cannot
open include file: '../../../src/qextserialport.h': No such file or
directory.
//When there is a qextserialport.h file in the QExtSerialPort/src folder. 

Any input at all would be incredible, I have been mulling over this for
quite some time now. 




--
View this message in context: 
http://cmake.3232098.n2.nabble.com/CMake-does-not-find-an-header-file-and-ignores-the-classes-found-in-several-other-header-files-tp7581066.html
Sent from the CMake mailing list archive at Nabble.com.
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Why are my static libs not being read?

2012-07-31 Thread Toronto Andrew
Thank you John, this did work. I get the idea now, thank you. 

I have another concern though, that I hope I can be helped with though it's
doesn't fall under the original problem.

So I am using a project within my project: http://i.imgur.com/bqqnp.png, and
I found a custom 
https://qextserialport.googlegroups.com/attach/9b25d0e5e8974d99/CMakeLists.txt?view=1&part=4
CMakeLists.txt  for it created by the developers, and I was wondering how
would I go about integrating that into my existing CMakeLists.txt, any input
regarding how to go about doing this will be greatly appreciated. 

Thank you guys once again!



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/Why-are-my-static-libs-not-being-read-tp7581042p7581048.html
Sent from the CMake mailing list archive at Nabble.com.
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Why are my static libs not being read?

2012-07-31 Thread Toronto Andrew
Include it using the flags? Like so: 


TARGET_LINK_LIBRARIES(CppSampleQt01 ${QT_LIBRARIES} SIMPLONLIB
SIMPLONIMGPROC) ?

Because when I did this, the libs were not found either. 




--
View this message in context: 
http://cmake.3232098.n2.nabble.com/Why-are-my-static-libs-not-being-read-tp7581042p7581044.html
Sent from the CMake mailing list archive at Nabble.com.
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Why are my static libs not being read?

2012-07-31 Thread Toronto Andrew
The qt libraries are included in the target link flag (this project uses qt
of course), however the two lib files that exist in the lib folder in the
same directory are either not recognized. They draw up linker issues in the
compiler, even though I can tell through the cmake gui that it does find
those paths. 

Any input at all would be great. Below I have included the CMakeLists.txt, a
screenshot of the cmake gui as well as a sample of the linking errors being
drawn. 

PROJECT(CppSampleQt01)
FIND_PACKAGE(Qt4 REQUIRED)

//These are the lines I am concerned do not function appropriately. However
you can  http://i.imgur.com/EDrHR.png see here  that they are recognized by
CMake 
FIND_LIBRARY(SIMPLONLIB lv.simplon lib)
FIND_LIBRARY(SIMPLONIMGPROC lv.simplon.imgproc lib)

SET(CppSampleQt01_SOURCES include/lv.simplon.class.cpp camera.cpp main.cpp
mainwindow.cpp osdep.cpp paint.cpp)
SET(CppSampleQt01_HEADERS include/lv.simplon.class.h camera.h mainwindow.h
osdep.h paint.h)
SET(CppSampleQt01_RESOURCES icons.qrc)

INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})

ADD_EXECUTABLE(CppSampleQt01 ${CppSampleQt01_SOURCES}
${CppSampleQt01_HEADERS_MOC}
${CppSampleQt01_RESOURCES_RCC})

TARGET_LINK_LIBRARIES(CppSampleQt01 ${QT_LIBRARIES})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} include QExtSerialPort/src)

And here are some of the relevant linker errors that are drawn: 

2>lv.simplon.class.obj : error LNK2019: unresolved external symbol
__imp__LvEventKill@4 referenced in function "public: unsigned int __thiscall
LvEvent::Kill(void)" (?Kill@LvEvent@@QAEIXZ)
2>lv.simplon.class.obj : error LNK2019: unresolved external symbol
__imp__LvEventFlush@4 referenced in function "public: unsigned int
__thiscall LvEvent::Flush(void)" (?Flush@LvEvent@@QAEIXZ)...




--
View this message in context: 
http://cmake.3232098.n2.nabble.com/Why-are-my-static-libs-not-being-read-tp7581042.html
Sent from the CMake mailing list archive at Nabble.com.
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake