Skip to content

Commit

Permalink
Remove explicit boost::nowide downstream dependency
Browse files Browse the repository at this point in the history
It is only linked to the bgcode executable and thus not needed by downstream if libbgcode is installed as a static library
  • Loading branch information
tamasmeszaros committed Aug 8, 2023
1 parent 89e882b commit a3c8866
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ if (${PROJECT_NAME}_BUILD_COMPONENT_Binarize)
endif ()
endif()

# Set this if downstream would need to link additional boost
# components
set(Boost_DOWNSTREAM_COMPONENTS nowide)

set(namespace "${PROJECT_NAME}::")

if (${PROJECT_NAME}_BUILD_COMPONENT_Convert)
Expand Down Expand Up @@ -158,9 +162,6 @@ if (${PROJECT_NAME}_BUILD_CMD_TOOL)
find_package(Boost ${Boost_VER} REQUIRED COMPONENTS nowide)
set_target_properties(${_libname}_cmd PROPERTIES OUTPUT_NAME ${_libname})
target_link_libraries(${_libname}_cmd ${_libname}_convert Boost::nowide)

# config script will need this to require nowide if the exported lib is static
set(Boost_DOWNSTREAM_COMPONENTS nowide)
endif ()

if(${PROJECT_NAME}_BUILD_TESTS)
Expand Down

0 comments on commit a3c8866

Please sign in to comment.