From d9174a110b0c99ce6ce8188dd7ac60b47dace7d0 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Mon, 9 Dec 2013 12:48:42 -0600 Subject: [PATCH] move ${Boost_LIBRARIES} into cvpcb, pcbnew, _pcbnew and out of github, because worker threads used regardless of github --- cvpcb/CMakeLists.txt | 1 + include/ki_mutex.h | 6 +++--- pcbnew/CMakeLists.txt | 6 +++++- pcbnew/github/CMakeLists.txt | 4 ++-- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/cvpcb/CMakeLists.txt b/cvpcb/CMakeLists.txt index f536f90cae..946c5c9684 100644 --- a/cvpcb/CMakeLists.txt +++ b/cvpcb/CMakeLists.txt @@ -107,6 +107,7 @@ target_link_libraries( cvpcb ${GDI_PLUS_LIBRARIES} ${GLEW_LIBRARIES} ${CAIRO_LIBRARIES} + ${Boost_LIBRARIES} ) # Only for win32 cross compilation using MXE diff --git a/include/ki_mutex.h b/include/ki_mutex.h index 1ae45155c0..1721de5c67 100644 --- a/include/ki_mutex.h +++ b/include/ki_mutex.h @@ -9,11 +9,9 @@ /// Using an unnamed resource is easier, providing a textual name for a /// constructor is cumbersome, so we make choice on that criteria mostly: -#if 0 +#if 1 // This is a fine choice between the two, but requires linking to ${Boost_LIBRARIES} -// which currently only happens when GITHUB_PLUGIN goes into pcbnew or _pcbnew. -// cvpcb is left out. Changing the 4 CMakeLists.txts fixes all this easily. #include #include @@ -23,6 +21,8 @@ typedef boost::interprocess::scoped_lock MUTLOCK; #else +// This choice also works. + #include typedef wxMutex MUTEX; diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 7c4f4f471d..3d168700dc 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -379,6 +379,7 @@ if( KICAD_SCRIPTING_MODULES ) ${GDI_PLUS_LIBRARIES} ${PYTHON_LIBRARIES} ${PCBNEW_EXTRA_LIBS} + ${Boost_LIBRARIES} ) # create .i files from XML doxygen parsing, docstrings.i will include all of them @@ -532,6 +533,8 @@ endif() # Link executable target pcbnew with correct libraries ### +message( STATUS "Boost_LIBRARIES:${Boost_LIBRARIES}" ) + target_link_libraries( pcbnew 3d-viewer pcbcommon @@ -550,11 +553,12 @@ target_link_libraries( pcbnew ${PCBNEW_EXTRA_LIBS} ${GLEW_LIBRARIES} ${CAIRO_LIBRARIES} + ${Boost_LIBRARIES} ) # Only for win32 cross compilation using MXE if( WIN32 AND MSYS AND CMAKE_CROSSCOMPILING ) -target_link_libraries(pcbnew +target_link_libraries( pcbnew opengl32 glu32 pixman-1 diff --git a/pcbnew/github/CMakeLists.txt b/pcbnew/github/CMakeLists.txt index 7228f0f504..34bf3c9cef 100644 --- a/pcbnew/github/CMakeLists.txt +++ b/pcbnew/github/CMakeLists.txt @@ -58,9 +58,9 @@ add_library( github_plugin github_plugin.cpp ) -# No, you don't get github without boost and openssl +# No, you don't get github without boost and openssl. Boost_LIBRARIES now moved up +# into CMakeLists.txt for pcbnew and cvpcb: target_link_libraries( github_plugin - ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} )