This repository was archived by the owner on Mar 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathFindMingwThreads.cmake
52 lines (47 loc) · 1.85 KB
/
FindMingwThreads.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
## @code
## ___ _____ _ ___ _ _____ ___ ___ ___ ___
## / __|_ _/_\ / __| |/ / __/ _ \| _ \/ __| __|
## \__ \ | |/ _ \ (__| ' <| _| (_) | / (__| _|
## |___/ |_/_/ \_\___|_|\_\_| \___/|_|_\\___|___|
## embedded.connectivity.solutions.==============
## @endcode
##
## @file
## @copyright STACKFORCE GmbH, Heitersheim, Germany, http://www.stackforce.de
## @author STACKFORCE
## @author Adrian Antonana <[email protected]>
## @brief CMake find module to get the mingw std threads project.
##
## This file is part of the STACKFORCE CMake modules collection
## (below "sf cmake modules collection").
##
## sf cmake modules collection is free software: you can redistribute it
## and/or modify it under the terms of the GNU Affero General Public License
## as published by the Free Software Foundation, either version 3 of the
## License, or (at your option) any later version.
##
## sf cmake modules collection is distributed in the hope that it will be
## useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU Affero General Public License for more details.
##
## You should have received a copy of the GNU Affero General Public License
## along with sf cmake modules collection.
## If not, see <http://www.gnu.org/licenses/>.
# mingw-std-threads
if(CMAKE_CROSSCOMPILING AND WIN32)
ExternalProject_Add(mingw-std-threads
GIT_REPOSITORY https://github.com/meganz/mingw-std-threads.git
GIT_TAG e85192de49cddf75fa4996364d4098830d30cdb4
UPDATE_DISCONNECTED 1
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
BUILD_ALWAYS 0
INSTALL_COMMAND ""
)
ExternalProject_Get_Property(mingw-std-threads source_dir)
message(STATUS "mingw-std-threads location: ${source_dir}")
set_target_properties(mingw-std-threads PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES ${source_dir}
)
endif()