Browse Source

fix linux build bug

master
tianzhendong 2 years ago
parent
commit
7edd258f22
  1. 10
      CMakeLists.txt

10
CMakeLists.txt

@ -2,16 +2,6 @@
project(QtXlsx LANGUAGES CXX) project(QtXlsx LANGUAGES CXX)
if(WIN32)
set(CMAKE_PREFIX_PATH "C:/DevelopEnv/Qt/5.15.2/mingw81_64")
set(QT_VERSION "5.15.2")
elseif(UNIX)
set(CMAKE_PREFIX_PATH "/home/tian/Qt5.12.3/5.12.3/gcc_64")
set(QT_VERSION "5.12.3")
# solve program: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
set(CMAKE_CXX_FLAGS -pthread)
endif()
include_directories(${CMAKE_PREFIX_PATH}/include/QtCore) include_directories(${CMAKE_PREFIX_PATH}/include/QtCore)
include_directories(${CMAKE_PREFIX_PATH}/include/QtCore/${QT_VERSION}) include_directories(${CMAKE_PREFIX_PATH}/include/QtCore/${QT_VERSION})
include_directories(${CMAKE_PREFIX_PATH}/include/QtCore/${QT_VERSION}/QtCore) include_directories(${CMAKE_PREFIX_PATH}/include/QtCore/${QT_VERSION}/QtCore)

Loading…
Cancel
Save