Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Cmake project to Qt qmake project, problem with -msse3
Forum Updated to NodeBB v4.3 + New Features

Cmake project to Qt qmake project, problem with -msse3

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 2.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    visoda
    wrote on last edited by
    #1

    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_bundle

    Input

    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 SSE2

    error "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!!!

    1 Reply Last reply
    0
    • P Offline
      P Offline
      pkj__
      wrote on last edited by
      #2

      bq. How can I give or set in Qt the following msse3 information from CMake?

      QMAKE_CXXFLAGS += -msse3

      1 Reply Last reply
      0
      • V Offline
        V Offline
        visoda
        wrote on last edited by
        #3

        Many Thanks!!! It worked!

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved