Fix link issue for qa_utils on MINGW/msys2

For some obscure reason, using Boost_UNIT_TEST_FRAMEWORK_LIBRARY as library
name to link does not work. So use the actual filename.
This commit is contained in:
jean-pierre charras 2023-03-08 17:47:50 +01:00
parent 6343147bb3
commit e4ec74e1ac
1 changed files with 9 additions and 1 deletions

View File

@ -1,6 +1,6 @@
# This program source code file is part of KiCad, a free EDA CAD application.
#
# Copyright (C) 2018 KiCad Developers, see CHANGELOG.TXT for contributors.
# Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -40,6 +40,12 @@ add_library( qa_utils STATIC
include_directories( BEFORE ${INC_BEFORE} )
# for some obscure reason, on mingw/msys2 ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} does not work
# So use the actual the lib filename:
if( MINGW )
set( LIBBOOST_UNIT_TEST_LIB libboost_unit_test_framework-mt )
endif()
target_link_libraries( qa_utils
common
turtle
@ -47,8 +53,10 @@ target_link_libraries( qa_utils
${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY}
${wxWidgets_LIBRARIES}
${LIBBOOST_UNIT_TEST_LIB}
)
target_include_directories( qa_utils PUBLIC
include
)