File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,18 @@ endif()
12
12
# backwards-compatible and therefore at most increase the minor version.
13
13
project (libsecp256k1 VERSION 0.3.2 LANGUAGES C)
14
14
15
+ if (CMAKE_VERSION VERSION_LESS 3.21)
16
+ get_directory_property (parent_directory PARENT_DIRECTORY )
17
+ if (parent_directory )
18
+ set (PROJECT_IS_TOP_LEVEL OFF CACHE INTERNAL "Emulates CMake 3.21+ behavior." )
19
+ set (${PROJECT_NAME} _IS_TOP_LEVEL OFF CACHE INTERNAL "Emulates CMake 3.21+ behavior." )
20
+ else ()
21
+ set (PROJECT_IS_TOP_LEVEL ON CACHE INTERNAL "Emulates CMake 3.21+ behavior." )
22
+ set (${PROJECT_NAME} _IS_TOP_LEVEL ON CACHE INTERNAL "Emulates CMake 3.21+ behavior." )
23
+ endif ()
24
+ unset (parent_directory )
25
+ endif ()
26
+
15
27
# The library version is based on libtool versioning of the ABI. The set of
16
28
# rules for updating the version can be found here:
17
29
# https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
You can’t perform that action at this time.
0 commit comments