Skip to content

Commit 3dddf67

Browse files
authored
Merge pull request #38 from xuboying/master
Check If Target Library Plutovg Already Exists in CMake Project
2 parents 789067a + 2e35120 commit 3dddf67

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ set(PLUTOSVG_VERSION_MICRO 7)
66

77
project(plutosvg LANGUAGES C VERSION ${PLUTOSVG_VERSION_MAJOR}.${PLUTOSVG_VERSION_MINOR}.${PLUTOSVG_VERSION_MICRO})
88

9-
find_package(plutovg 1.0.0 QUIET)
10-
if(NOT plutovg_FOUND)
11-
add_subdirectory(plutovg)
9+
if (NOT TARGET plutovg::plutovg)
10+
find_package(plutovg 1.0.0 QUIET)
11+
if(NOT plutovg_FOUND)
12+
add_subdirectory(plutovg)
13+
endif()
1214
endif()
1315

1416
set(plutosvg_sources

0 commit comments

Comments
 (0)