#4448 Add -lrt and -lpthread to standalone CEEVIZ build on Linux

This commit is contained in:
Gaute Lindkvist 2019-05-28 13:02:13 +02:00
parent a54e3f30c4
commit 9cf0b7cb86
3 changed files with 19 additions and 3 deletions

View File

@ -46,8 +46,13 @@ endif(CEE_USE_QT5)
add_definitions(-DCVF_USING_CMAKE)
set(SYSTEM_LIBRARIES)
if (CMAKE_COMPILER_IS_GNUCXX)
set(SYSTEM_LIBRARIES -lrt -lpthread)
endif(CMAKE_COMPILER_IS_GNUCXX)
add_executable(${PROJECT_NAME} ${CEE_SOURCE_FILES} ${MOC_SOURCE_FILES})
target_link_libraries(${PROJECT_NAME} ${CEE_LIBS} ${OPENGL_LIBRARIES} ${QT_LIBRARIES})
target_link_libraries(${PROJECT_NAME} ${CEE_LIBS} ${OPENGL_LIBRARIES} ${QT_LIBRARIES} ${SYSTEM_LIBRARIES})
if (CEE_USE_QT5)
foreach (qtlib ${QT_LIBRARIES})

View File

@ -20,6 +20,7 @@ include_directories(${LibGuiQt_SOURCE_DIR})
include_directories(${LibUtilities_SOURCE_DIR})
set(CEE_LIBS LibUtilities LibGuiQt LibViewing LibRender LibGeometry LibIo LibCore)
set(EXTERNAL_LIBS)
set(CEE_SOURCE_FILES
QMVFactory.cpp
@ -48,8 +49,13 @@ endif(CEE_USE_QT5)
# Run MOC on the headers
add_definitions(-DCVF_USING_CMAKE)
set(SYSTEM_LIBRARIES)
if (CMAKE_COMPILER_IS_GNUCXX)
set(SYSTEM_LIBRARIES -lrt -lpthread)
endif(CMAKE_COMPILER_IS_GNUCXX)
add_executable(${PROJECT_NAME} ${CEE_SOURCE_FILES} ${MOC_SOURCE_FILES})
target_link_libraries(${PROJECT_NAME} ${CEE_LIBS} ${OPENGL_LIBRARIES} ${QT_LIBRARIES})
target_link_libraries(${PROJECT_NAME} ${CEE_LIBS} ${OPENGL_LIBRARIES} ${QT_LIBRARIES} ${SYSTEM_LIBRARIES})
if (CEE_USE_QT5)
foreach (qtlib ${QT_LIBRARIES})

View File

@ -58,8 +58,13 @@ endif(CEE_USE_QT5)
add_definitions(-DCVF_USING_CMAKE)
set(SYSTEM_LIBRARIES)
if (CMAKE_COMPILER_IS_GNUCXX)
set(SYSTEM_LIBRARIES -lrt -lpthread)
endif(CMAKE_COMPILER_IS_GNUCXX)
add_executable(${PROJECT_NAME} ${CEE_SOURCE_FILES} ${MOC_SOURCE_FILES})
target_link_libraries(${PROJECT_NAME} ${CEE_LIBS} ${OPENGL_LIBRARIES} ${QT_LIBRARIES})
target_link_libraries(${PROJECT_NAME} ${CEE_LIBS} ${OPENGL_LIBRARIES} ${QT_LIBRARIES} ${SYSTEM_LIBRARIES})
if (CEE_USE_QT5)