Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Tossy0423 committed Sep 19, 2021
1 parent 86267f8 commit eab2371
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,17 @@ else()
endif()

if(USE_INTEGRATED_LIBS)
set(PThreads_windows_DIR ${CMAKE_CURRENT_LIST_DIR}/3rdparty/pthreads CACHE PATH "Path where pthreads for windows can be located")
set(PThreads4W_ROOT ${CMAKE_CURRENT_LIST_DIR}/3rdparty/pthreads CACHE PATH "Path where pthreads for windows can be located")
endif()
set(Stb_DIR ${CMAKE_CURRENT_LIST_DIR}/3rdparty/stb CACHE PATH "Path where Stb image library can be located")

set(CMAKE_DEBUG_POSTFIX d)
set(CMAKE_THREAD_PREFER_PTHREAD ON)
find_package(Threads REQUIRED)
if(MSVC)
find_package(PThreads_windows REQUIRED)
if(MSVC AND USE_INTEGRATED_LIBS)
find_package(PThreads4W REQUIRED)
elseif(MSVC)
find_package(pthreads REQUIRED)
endif()
if(ENABLE_OPENCV)
find_package(OpenCV REQUIRED)
Expand Down

0 comments on commit eab2371

Please sign in to comment.