Skip to content
Snippets Groups Projects
Commit af11939e authored by Lars Bilke's avatar Lars Bilke
Browse files

Fix OGS_NO_EXTERNAL_LIBS=ON build.

parent 07e13253
No related branches found
No related tags found
No related merge requests found
......@@ -66,6 +66,18 @@ find_program(S3CMD_TOOL_PATH s3cmd DOC "S3cmd tool for uploading to Amazon S3")
### Find libraries ###
######################
## pthread, is a requirement of logog ##
if(CMAKE_CROSSCOMPILING)
set(THREADS_PTHREAD_ARG 0 CACHE STRING "Result from TRY_RUN" FORCE)
endif()
set(CMAKE_THREAD_PREFER_PTHREAD ON)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
if(CMAKE_USE_PTHREADS_INIT)
set(HAVE_PTHREADS TRUE)
add_definitions(-DHAVE_PTHREADS)
endif()
# Do not search for libs if this option is set
if(OGS_NO_EXTERNAL_LIBS)
return()
......@@ -95,18 +107,6 @@ if(OGS_BUILD_GUI)
endif()
endif()
## pthread ##
if(CMAKE_CROSSCOMPILING)
set(THREADS_PTHREAD_ARG 0 CACHE STRING "Result from TRY_RUN" FORCE)
endif()
set(CMAKE_THREAD_PREFER_PTHREAD ON)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
if(CMAKE_USE_PTHREADS_INIT)
set(HAVE_PTHREADS TRUE)
add_definitions(-DHAVE_PTHREADS)
endif()
# lapack
find_package(LAPACK QUIET)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment