CMake: Fix invalid syntax

In 1f7656e845 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.
This commit is contained in:
Robert Adam 2022-09-03 17:13:31 +02:00
parent 59ae71df2b
commit 92137e8050
1 changed files with 7 additions and 1 deletions

View File

@ -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)