Skip to content

Commit

Permalink
Make everything Threads library dependent
Browse files Browse the repository at this point in the history
  • Loading branch information
Gennady Pospelov committed Mar 13, 2020
1 parent da0fa13 commit e24a449
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cmake/modules/configuration.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

find_package(Qt5 COMPONENTS Widgets Core Gui PrintSupport REQUIRED)
find_package(Threads)

get_target_property(Qt5Widgets_location Qt5::Widgets LOCATION_Release)
message(STATUS " ${Qt5Widgets_LIBRARIES} ${Qt5Widgets_location}")
Expand All @@ -22,6 +23,6 @@ message(STATUS " Includes: ${Qt5Widgets_INCLUDE_DIRS}")
# Generating config files

configure_file(${CMAKE_SOURCE_DIR}/cmake/scripts/testconfig.h.in ${BUILD_INC_DIR}/testconfig.h @ONLY)
add_definitions(-I${BUILD_INC_DIR})
add_definitions(-I${BUILD_INC_DIR} -pthread)

add_compile_options($<$<CXX_COMPILER_ID:MSVC>:/MP>)
2 changes: 1 addition & 1 deletion source/libmvvm_model/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ add_library(mvvm_model SHARED "")

add_subdirectory(mvvm)

target_link_libraries(mvvm_model PUBLIC Qt5::Widgets PRIVATE qcustomplot)
target_link_libraries(mvvm_model PUBLIC Qt5::Widgets Threads::Threads PRIVATE qcustomplot)

target_include_directories(mvvm_model PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>)

Expand Down

0 comments on commit e24a449

Please sign in to comment.