Fixed ${CMAKE_THREAD_LIBS_INIT} being empty during the compilation

The directive checking for the native threads library must be
called before everything else.
This commit is contained in:
Mathäus Mendel 2016-03-11 10:35:23 -03:00
parent 8895045fb5
commit ce8e88cc4b

View File

@ -139,6 +139,9 @@ include(DefinePlatformSpecifc)
# Collect the built libraries and include dirs, the will be used to create the PocoConfig.cmake file
set(Poco_COMPONENTS "")
# Pthreads/threads support
find_package(Threads REQUIRED)
if (ENABLE_TESTS)
add_subdirectory(CppUnit)
endif ()
@ -169,9 +172,6 @@ add_subdirectory(Net)
list(APPEND Poco_COMPONENTS "Net")
endif()
# Pthreads/threads support
find_package(Threads REQUIRED)
#NetSSL