Skip to content

Commit f08ea56

Browse files
committed
fix: cmake export/install of fmt dependency
1 parent 9ff7d60 commit f08ea56

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ if(NOT TARGET fmt::fmt)
2828
if(TARGET fmt)
2929
add_library(fmt::fmt ALIAS fmt)
3030
else()
31+
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
32+
set(FMT_INSTALL ON CACHE BOOL "" FORCE)
33+
endif()
3134
FetchContent_Declare(
3235
fmtlib
3336
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
@@ -74,7 +77,7 @@ else()
7477
endif()
7578

7679
target_link_libraries(OpenDrive PUBLIC pugixml::pugixml)
77-
target_link_libraries(OpenDrive PRIVATE fmt::fmt)
80+
target_link_libraries(OpenDrive PUBLIC fmt::fmt)
7881

7982
target_include_directories(
8083
OpenDrive PUBLIC

0 commit comments

Comments
 (0)