From e079ef492d98cc949ddd6a0f4b45c254bb7975b6 Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Tue, 26 Aug 2014 13:26:43 +0200 Subject: [PATCH] debian/patches/modify_cmake_for_debian: update to link against pthread --- debian/patches/modify_cmake_for_debian | 35 ++++++++++++-------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/debian/patches/modify_cmake_for_debian b/debian/patches/modify_cmake_for_debian index 37fd4d0..4e89d4b 100644 --- a/debian/patches/modify_cmake_for_debian +++ b/debian/patches/modify_cmake_for_debian @@ -1,25 +1,22 @@ Description: Modify CmakeLists for Debian Avoid using the boundled libraries but link the system ones. Author: Don Armstrong +Author: Mattia Rizzolo Forwarded: no -Last-Update: 2013-02-14 +Last-Update: 2014-08-26 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -41,12 +41,12 @@ +@@ -41,12 +41,8 @@ set( CMAKE_OSX_ARCHITECTURES "i386;x86_64" ) # The parsing order is significant! -add_subdirectory( src/BoostParts ) -add_subdirectory( src/Xerces ) -+#add_subdirectory( src/BoostParts ) -+#add_subdirectory( src/Xerces ) add_subdirectory( src/XercesExtensions ) -add_subdirectory( src/zlib ) -+#add_subdirectory( src/zlib ) add_subdirectory( src/zipios ) -add_subdirectory( src/googlemock ) -+#add_subdirectory( src/googlemock ) add_subdirectory( src/FlightCrew ) add_subdirectory( src/FlightCrew-cli ) @@ -35,29 +32,27 @@ Last-Update: 2013-02-14 set_source_files_properties( main.cpp PROPERTIES COMPILE_DEFINITIONS FLIGHTCREW_FULL_VERSION="${FLIGHTCREW_FULL_VERSION}" ) --- a/src/FlightCrew/CMakeLists.txt +++ b/src/FlightCrew/CMakeLists.txt -@@ -50,8 +50,8 @@ +@@ -50,9 +50,7 @@ # creating PCH's for MSVC and GCC on Linux include( ${CMAKE_SOURCE_DIR}/cmake_extras/CustomPCH.cmake ) -set( ALL_INCLUDES ${BoostParts_SOURCE_DIR} - ${Xerces_SOURCE_DIR} -+set( ALL_INCLUDES # ${BoostParts_SOURCE_DIR} -+# ${Xerces_SOURCE_DIR} - ${zipios_SOURCE_DIR} ) +- ${zipios_SOURCE_DIR} ) ++set( ALL_INCLUDES ${zipios_SOURCE_DIR} ) set( GCC_PCH_TARGET gccPCH_fc ) -@@ -65,8 +65,8 @@ + precompiled_header( SOURCES ALL_INCLUDES ${GCC_PCH_TARGET} ${PCH_NAME} ) +@@ -65,8 +63,6 @@ include_directories( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ../zipios - ../BoostParts - ../Xerces -+# ../BoostParts -+# ../Xerces ../XercesExtensions ../utf8-cpp ) -@@ -78,11 +78,28 @@ +@@ -78,11 +74,29 @@ # when they want a dll, but NOT FC_DLL_EXPORTING add_definitions( -DFC_DLL_EXPORTING -DFC_BUILT_AS_DLL ) add_library( ${PROJECT_NAME} SHARED ${SOURCES} ) @@ -80,22 +75,24 @@ Last-Update: 2013-02-14 +find_library(BOOST_S boost_system) +find_library(BOOST_T boost_thread) +find_library(LIB_XERCES xerces-c) ++find_library(PTHREAD pthread) +SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES LINK_FLAGS -Wl,--as-needed) -+target_link_libraries( ${PROJECT_NAME} ${LIB_ZLIB} ${BOOST_DT} ${BOOST_FS} ${BOOST_PO} ${BOOST_RE} ${BOOST_S} ${BOOST_T} zipios ${LIB_XERCES} XercesExtensions ) ++target_link_libraries( ${PROJECT_NAME} ${LIB_ZLIB} ${BOOST_DT} ${BOOST_FS} ${BOOST_PO} ${BOOST_RE} ${BOOST_S} ${BOOST_T} zipios ${LIB_XERCES} XercesExtensions ${PTHREAD} ) +INSTALL(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib COMPONENT libraries) +INSTALL(FILES flightcrew.h exception.h DllExporting.h Result.h DESTINATION include/${PROJECT_NAME}) ############################################################################# -@@ -116,7 +133,7 @@ +@@ -115,9 +129,6 @@ + add_dependencies( ${PROJECT_NAME} ${GCC_PCH_TARGET} ) endif() - # needed for correct Xerces header inclusion +-# needed for correct Xerces header inclusion -add_definitions( -DXERCES_STATIC_LIBRARY ) -+#add_definitions( -DXERCES_STATIC_LIBRARY ) - +- ############################################################################# + # We don't build the tests when fc is built as a shared --- a/src/FlightCrew-gui/CMakeLists.txt +++ b/src/FlightCrew-gui/CMakeLists.txt @@ -67,7 +67,7 @@ -- 2.39.2