Skip to content

Commit 636d0b6

Browse files
committed
cmake: Make SECP256K1_INSTALL dependent on PROJECT_IS_TOP_LEVEL
Also full stops have been added to the option help texts for consistency in cmake-gui.
1 parent 162608c commit 636d0b6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,14 @@ set(CMAKE_C_EXTENSIONS OFF)
3838

3939
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
4040

41-
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
41+
option(BUILD_SHARED_LIBS "Build shared libraries." ON)
4242
option(SECP256K1_DISABLE_SHARED "Disable shared library. Overrides BUILD_SHARED_LIBS." OFF)
4343
if(SECP256K1_DISABLE_SHARED)
4444
set(BUILD_SHARED_LIBS OFF)
4545
endif()
4646

47-
option(SECP256K1_INSTALL "Enable installation" ON)
47+
include(CMakeDependentOption)
48+
cmake_dependent_option(SECP256K1_INSTALL "Enable installation." ON "PROJECT_IS_TOP_LEVEL" OFF)
4849

4950
option(SECP256K1_ENABLE_MODULE_ECDH "Enable ECDH module." ON)
5051
if(SECP256K1_ENABLE_MODULE_ECDH)

0 commit comments

Comments
 (0)