Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
2a3cf873
"...transform/git@developer.sourcefind.cn:OpenDAS/dgl.git" did not exist on "9a00cf194fcf994b2527cd927d691144f5e9c47b"
Commit
2a3cf873
authored
Feb 25, 2016
by
Taylor Braun-Jones
Browse files
Use FindThreads module to properly find pthreads for cross-builds
parent
210bb301
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
dlib/CMakeLists.txt
dlib/CMakeLists.txt
+7
-6
No files found.
dlib/CMakeLists.txt
View file @
2a3cf873
...
@@ -132,6 +132,13 @@ if (NOT TARGET dlib)
...
@@ -132,6 +132,13 @@ if (NOT TARGET dlib)
stack_trace.cpp
stack_trace.cpp
)
)
set
(
dlib_needed_libraries
)
if
(
UNIX
)
set
(
CMAKE_THREAD_PREFER_PTHREAD ON
)
find_package
(
Threads REQUIRED
)
set
(
dlib_needed_libraries
${
dlib_needed_libraries
}
${
CMAKE_THREAD_LIBS_INIT
}
)
endif
()
# we want to link to the right stuff depending on our platform.
# we want to link to the right stuff depending on our platform.
if
(
WIN32 AND NOT CYGWIN
)
###############################################################################
if
(
WIN32 AND NOT CYGWIN
)
###############################################################################
if
(
DLIB_NO_GUI_SUPPORT
)
if
(
DLIB_NO_GUI_SUPPORT
)
...
@@ -140,9 +147,6 @@ if (NOT TARGET dlib)
...
@@ -140,9 +147,6 @@ if (NOT TARGET dlib)
set
(
dlib_needed_libraries ws2_32 winmm comctl32 gdi32 imm32
)
set
(
dlib_needed_libraries ws2_32 winmm comctl32 gdi32 imm32
)
endif
()
endif
()
elseif
(
APPLE
)
############################################################################
elseif
(
APPLE
)
############################################################################
find_library
(
pthreadlib pthread
)
set
(
dlib_needed_libraries
${
pthreadlib
}
)
if
(
NOT DLIB_NO_GUI_SUPPORT
)
if
(
NOT DLIB_NO_GUI_SUPPORT
)
find_package
(
X11 QUIET
)
find_package
(
X11 QUIET
)
if
(
X11_FOUND
)
if
(
X11_FOUND
)
...
@@ -178,9 +182,6 @@ if (NOT TARGET dlib)
...
@@ -178,9 +182,6 @@ if (NOT TARGET dlib)
mark_as_advanced
(
pthreadlib xlib xlib_path x11_path
)
mark_as_advanced
(
pthreadlib xlib xlib_path x11_path
)
else
()
##################################################################################
else
()
##################################################################################
find_library
(
pthreadlib pthread
)
set
(
dlib_needed_libraries
${
pthreadlib
}
)
# link to the nsl library if it exists. this is something you need sometimes
# link to the nsl library if it exists. this is something you need sometimes
find_library
(
nsllib nsl
)
find_library
(
nsllib nsl
)
if
(
nsllib
)
if
(
nsllib
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment