Skip to content

Commit e29a52f

Browse files
committed
Add option to avoid requiring UV from FindNodeJS script when building UV as shared library as in Guix.
1 parent 9153c96 commit e29a52f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cmake/FindNodeJS.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ if(NODEJS_INCLUDE_DIR)
3636
endif()
3737

3838
option(NODEJS_CMAKE_DEBUG "Print paths for debugging NodeJS dependencies." OFF)
39+
option(NODEJS_SHARED_UV "If it is enabled, libuv won't be required by this script." OFF)
3940

4041
# Include package manager
4142
include(FindPackageHandleStandardArgs)
@@ -68,7 +69,9 @@ else()
6869
set(NODEJS_V8_HEADERS v8.h v8-version.h)
6970
endif()
7071

71-
set(NODEJS_UV_HEADERS uv.h) # TODO: Add uv-(platform).h?
72+
if(NOT NODEJS_SHARED_UV)
73+
set(NODEJS_UV_HEADERS uv.h)
74+
endif()
7275

7376
set(NODEJS_HEADERS
7477
node.h

0 commit comments

Comments
 (0)