Description: Modify CmakeLists for Debian
Avoid using the boundled libraries but link the system ones.
Author: Don Armstrong <don@debian.org>
+Author: Mattia Rizzolo <mattia@mapreri.org>
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" )\r
\r
# The parsing order is significant!\r
-add_subdirectory( src/BoostParts )\r
-add_subdirectory( src/Xerces )\r
-+#add_subdirectory( src/BoostParts )\r
-+#add_subdirectory( src/Xerces )\r
add_subdirectory( src/XercesExtensions )\r
-add_subdirectory( src/zlib )\r
-+#add_subdirectory( src/zlib )\r
add_subdirectory( src/zipios )\r
-add_subdirectory( src/googlemock )\r
-+#add_subdirectory( src/googlemock )\r
add_subdirectory( src/FlightCrew )\r
add_subdirectory( src/FlightCrew-cli )\r
\r
set_source_files_properties( main.cpp PROPERTIES COMPILE_DEFINITIONS FLIGHTCREW_FULL_VERSION="${FLIGHTCREW_FULL_VERSION}" )\r
--- a/src/FlightCrew/CMakeLists.txt
+++ b/src/FlightCrew/CMakeLists.txt
-@@ -50,8 +50,8 @@
+@@ -50,9 +50,7 @@
\r
# creating PCH's for MSVC and GCC on Linux\r
include( ${CMAKE_SOURCE_DIR}/cmake_extras/CustomPCH.cmake )\r
-set( ALL_INCLUDES ${BoostParts_SOURCE_DIR}\r
- ${Xerces_SOURCE_DIR}\r
-+set( ALL_INCLUDES # ${BoostParts_SOURCE_DIR}\r
-+# ${Xerces_SOURCE_DIR}\r
- ${zipios_SOURCE_DIR} )\r
+- ${zipios_SOURCE_DIR} )\r
++set( ALL_INCLUDES ${zipios_SOURCE_DIR} )\r
set( GCC_PCH_TARGET gccPCH_fc )\r
\r
-@@ -65,8 +65,8 @@
+ precompiled_header( SOURCES ALL_INCLUDES ${GCC_PCH_TARGET} ${PCH_NAME} )\r
+@@ -65,8 +63,6 @@
include_directories( ${CMAKE_CURRENT_BINARY_DIR}\r
${CMAKE_CURRENT_SOURCE_DIR}\r
../zipios \r
- ../BoostParts \r
- ../Xerces\r
-+# ../BoostParts \r
-+# ../Xerces\r
../XercesExtensions\r
../utf8-cpp\r
)\r
-@@ -78,11 +78,28 @@
+@@ -78,11 +74,29 @@
# when they want a dll, but NOT FC_DLL_EXPORTING\r
add_definitions( -DFC_DLL_EXPORTING -DFC_BUILT_AS_DLL )\r
add_library( ${PROJECT_NAME} SHARED ${SOURCES} )\r
+find_library(BOOST_S boost_system)\r
+find_library(BOOST_T boost_thread)\r
+find_library(LIB_XERCES xerces-c)\r
++find_library(PTHREAD pthread)\r
+SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES LINK_FLAGS -Wl,--as-needed)\r
-+target_link_libraries( ${PROJECT_NAME} ${LIB_ZLIB} ${BOOST_DT} ${BOOST_FS} ${BOOST_PO} ${BOOST_RE} ${BOOST_S} ${BOOST_T} zipios ${LIB_XERCES} XercesExtensions )\r
++target_link_libraries( ${PROJECT_NAME} ${LIB_ZLIB} ${BOOST_DT} ${BOOST_FS} ${BOOST_PO} ${BOOST_RE} ${BOOST_S} ${BOOST_T} zipios ${LIB_XERCES} XercesExtensions ${PTHREAD} )\r
+INSTALL(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib COMPONENT libraries)\r
+INSTALL(FILES flightcrew.h exception.h DllExporting.h Result.h DESTINATION include/${PROJECT_NAME})\r
\r
#############################################################################\r
\r
-@@ -116,7 +133,7 @@
+@@ -115,9 +129,6 @@
+ add_dependencies( ${PROJECT_NAME} ${GCC_PCH_TARGET} )\r
endif()\r
\r
- # needed for correct Xerces header inclusion\r
+-# needed for correct Xerces header inclusion\r
-add_definitions( -DXERCES_STATIC_LIBRARY )\r
-+#add_definitions( -DXERCES_STATIC_LIBRARY )\r
- \r
+-\r
#############################################################################\r
\r
+ # We don't build the tests when fc is built as a shared\r
--- a/src/FlightCrew-gui/CMakeLists.txt
+++ b/src/FlightCrew-gui/CMakeLists.txt
@@ -67,7 +67,7 @@