Cmake project to Qt qmake project, problem with -msse3
-
I'm very new to Qt and Linux, but hopefully you could help to find a solution for the following problem.
I have a couple of complex Qt projects which are working fine. But now I want to use a CMake project (library for visual odometry) together with my other Qt projects (camera frame grabber, projects based on OpenCV...).Therefore I used the following command to import all header and source files from the cmake project.
@qmake -project@Then my .pro file looks like this:
@TEMPLATE = app
#DEPENDPATH += .
#INCLUDEPATH += .added by me
QT += core
QT -= gui
TARGET = libvisoT
CONFIG += console
CONFIG -= app_bundleInput
HEADERS += filter.h
matcher.h
matrix.h
reconstruction.h
timer.h
triangle.h
viso.h
viso_mono.h
viso_stereo.h
SOURCES += filter.cpp
main.cpp
matcher.cpp
matrix.cpp
reconstruction.cpp
triangle.cpp
viso.cpp
viso_mono.cpp
viso_stereo.cpp@When I Run the project I got lots of errors, like:
/usr/lib/gcc/i686-linux-gnu/4.6/include/emmintrin.h:32: error: #error "SSE2 instruction set not enabled"
or
/usr/lib/gcc/i686-linux-gnu/4.6/include/pmmintrin.h:32: error: #error "SSE3 instruction set not enabled"This is the place where the error occures in the emmintrin.h file:
@#ifndef SSE2error "SSE2 instruction set not enabled"
#else@
I think thats because I haven't set the msse3 instruction, like it is done with the following code in the CMakeLists.txt file:
@# use sse3 instruction set
SET(CMAKE_CXX_FLAGS "-msse3")@The whole CMakeLists.txt file:
@# project
cmake_minimum_required (VERSION 2.6)
project (libviso2)directories
set (LIBVISO2_SRC_DIR src)
include directory
include_directories("${LIBVISO2_SRC_DIR}")
use sse3 instruction set
SET(CMAKE_CXX_FLAGS "-msse3")
sources
FILE(GLOB LIBVISO2_SRC_FILES "src/*.cpp")
make release version
set(CMAKE_BUILD_TYPE Release)
demo program
add_executable(viso2 ${LIBVISO2_SRC_FILES})
target_link_libraries (viso2 png)@How can I give or set in Qt the following msse3 information from CMake?
@SET(CMAKE_CXX_FLAGS "-msse3")@Or how can I make a Qt project out of this CMake project?
Many thanks for any help!!!