Browse Source

Fix boost dependencies

* Add Boost::locale explicetly to the CMake since nanoodbc requires it
* Don't let nanoodbc add all Boost libraries to the link line, since it
  is used in common, and it was pulling the unit test framework into
  common then.
newinvert
Ian McInerney 3 years ago
parent
commit
e20b33cb66
  1. 7
      CMakeLists.txt
  2. 4
      common/CMakeLists.txt
  3. 3
      qa/CMakeLists.txt
  4. 2
      thirdparty/nanodbc/CMakeLists.txt

7
CMakeLists.txt

@ -775,6 +775,13 @@ include_directories( SYSTEM ${PIXMAN_INCLUDE_DIR} )
#
# Find Boost headers and libraries, required.
set( BOOST_REQUESTED_COMPONENTS locale ) # locale is required by nanoodbc/database libraries
if( KICAD_BUILD_QA_TESTS )
# required by the unit test framework
list( APPEND BOOST_REQUESTED_COMPONENTS unit_test_framework system )
endif()
find_package( Boost 1.71.0 REQUIRED COMPONENTS ${BOOST_REQUESTED_COMPONENTS} )
#

4
common/CMakeLists.txt

@ -489,8 +489,10 @@ target_link_libraries( common
pybind11::embed
compoundfilereader
pcm_settings
nanodbc # for now; maybe hoist out of common
Boost::headers
# Database support needs these two
nanodbc # for now; maybe hoist out of common
Boost::locale
${CURL_LIBRARIES}
${wxWidgets_LIBRARIES}
${EXTRA_LIBS}

3
qa/CMakeLists.txt

@ -19,9 +19,6 @@
# or you may write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
list( APPEND BOOST_REQUESTED_COMPONENTS unit_test_framework system )
find_package( Boost 1.71.0 REQUIRED COMPONENTS ${BOOST_REQUESTED_COMPONENTS} )
include(KiCadQABuildUtils)
if( KICAD_TEST_XML_OUTPUT )

2
thirdparty/nanodbc/CMakeLists.txt

@ -174,7 +174,7 @@ add_library(nanodbc
nanodbc/nanodbc.cpp
nanodbc/nanodbc.h)
target_link_libraries(nanodbc ${Boost_LIBRARIES} ${ODBC_LIBRARIES})
target_link_libraries(nanodbc Boost::locale ${ODBC_LIBRARIES})
if(APPLE)
target_link_libraries(nanodbc ${ODBC_LINK_FLAGS})

Loading…
Cancel
Save