diff options
author | Robert Adam <dev@robert-adam.de> | 2022-09-03 18:13:31 +0300 |
---|---|---|
committer | Robert Adam <dev@robert-adam.de> | 2022-09-03 18:13:31 +0300 |
commit | 92137e8050b0c2dbcb51aa2f5f8321636d88c5da (patch) | |
tree | 9380981d77c3aace090e1f23801f2db8f449cc0e /CMakeLists.txt | |
parent | 59ae71df2be6c3f8b6dcd104fb8abc55a9d062c4 (diff) |
CMake: Fix invalid syntax
In 1f7656e8454ae96f1657cf91abe8b01dc667689c I introduced a new option
but for setting its default value, I accidentally introduced invalid
cmake syntax that blows off as soon as BUILD_SHARED_LIBS is actually
defined to be non-empty.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d1dee59f..d69f71eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,13 @@ cmake_minimum_required(VERSION 3.10) project(Tracy LANGUAGES CXX) -option(TRACY_STATIC "Whether to build Tracy as a static library" NOT ${BUILD_SHARED_LIBS}) +if(${BUILD_SHARED_LIBS}) + set(DEFAULT_STATIC OFF) +else() + set(DEFAULT_STATIC ON) +endif() + +option(TRACY_STATIC "Whether to build Tracy as a static library" ${DEFAULT_STATIC}) find_package(Threads REQUIRED) |