4 set( CMAKE_OSX_ARCHITECTURES "i386;x86_64" )
\r
6 # The parsing order is significant!
\r
7 -add_subdirectory( src/BoostParts )
\r
8 -add_subdirectory( src/Xerces )
\r
9 +#add_subdirectory( src/BoostParts )
\r
10 +#add_subdirectory( src/Xerces )
\r
11 add_subdirectory( src/XercesExtensions )
\r
12 -add_subdirectory( src/zlib )
\r
13 +#add_subdirectory( src/zlib )
\r
14 add_subdirectory( src/zipios )
\r
15 -add_subdirectory( src/googlemock )
\r
16 +#add_subdirectory( src/googlemock )
\r
17 add_subdirectory( src/FlightCrew )
\r
18 add_subdirectory( src/FlightCrew-cli )
\r
20 --- a/src/FlightCrew-cli/CMakeLists.txt
21 +++ b/src/FlightCrew-cli/CMakeLists.txt
23 # "Print all warnings" flag for GCC
\r
24 elseif( CMAKE_COMPILER_IS_GNUCXX )
\r
25 add_definitions( -Wall )
\r
26 + set_target_properties( ${PROJECT_NAME} PROPERTIES LINK_FLAGS -Wl,--as-needed )
\r
29 set_source_files_properties( main.cpp PROPERTIES COMPILE_DEFINITIONS FLIGHTCREW_FULL_VERSION="${FLIGHTCREW_FULL_VERSION}" )
\r
30 --- a/src/FlightCrew/CMakeLists.txt
31 +++ b/src/FlightCrew/CMakeLists.txt
34 # creating PCH's for MSVC and GCC on Linux
\r
35 include( ${CMAKE_SOURCE_DIR}/cmake_extras/CustomPCH.cmake )
\r
36 -set( ALL_INCLUDES ${BoostParts_SOURCE_DIR}
\r
37 - ${Xerces_SOURCE_DIR}
\r
38 +set( ALL_INCLUDES # ${BoostParts_SOURCE_DIR}
\r
39 +# ${Xerces_SOURCE_DIR}
\r
40 ${zipios_SOURCE_DIR} )
\r
41 set( GCC_PCH_TARGET gccPCH_fc )
\r
44 include_directories( ${CMAKE_CURRENT_BINARY_DIR}
\r
45 ${CMAKE_CURRENT_SOURCE_DIR}
\r
55 # when they want a dll, but NOT FC_DLL_EXPORTING
\r
56 add_definitions( -DFC_DLL_EXPORTING -DFC_BUILT_AS_DLL )
\r
57 add_library( ${PROJECT_NAME} SHARED ${SOURCES} )
\r
58 + SET_TARGET_PROPERTIES(
\r
65 add_library( ${PROJECT_NAME} ${SOURCES} )
\r
68 -target_link_libraries( ${PROJECT_NAME} zipios BoostParts XercesExtensions )
\r
69 +find_library(LIB_ZLIB z)
\r
70 +find_library(BOOST_DT boost_date_time)
\r
71 +find_library(BOOST_FS boost_filesystem)
\r
72 +find_library(BOOST_PO boost_program_options)
\r
73 +find_library(BOOST_RE boost_regex)
\r
74 +find_library(BOOST_S boost_system)
\r
75 +find_library(BOOST_T boost_thread)
\r
76 +find_library(LIB_XERCES xerces-c)
\r
77 +SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES LINK_FLAGS -Wl,--as-needed)
\r
78 +target_link_libraries( ${PROJECT_NAME} ${LIB_ZLIB} ${BOOST_DT} ${BOOST_FS} ${BOOST_PO} ${BOOST_RE} ${BOOST_S} ${BOOST_T} zipios ${LIB_XERCES} XercesExtensions )
\r
79 +INSTALL(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib COMPONENT libraries)
\r
80 +INSTALL(FILES flightcrew.h exception.h DllExporting.h Result.h DESTINATION include/${PROJECT_NAME})
\r
82 #############################################################################
\r
87 # needed for correct Xerces header inclusion
\r
88 -add_definitions( -DXERCES_STATIC_LIBRARY )
\r
89 +#add_definitions( -DXERCES_STATIC_LIBRARY )
\r
91 #############################################################################
\r
93 --- a/src/FlightCrew-gui/CMakeLists.txt
94 +++ b/src/FlightCrew-gui/CMakeLists.txt
96 # and the headers for the linked-to libraries
\r
97 include_directories( ${CMAKE_CURRENT_SOURCE_DIR}
\r
98 ${CMAKE_CURRENT_BINARY_DIR}
\r
99 - ${BoostParts_SOURCE_DIR}
\r
100 +# ${BoostParts_SOURCE_DIR}
\r
101 ${FlightCrew_SOURCE_DIR}
\r
102 ${XercesExtensions_SOURCE_DIR}
\r
105 # "Print all warnings" flag for GCC
\r
106 elseif( CMAKE_COMPILER_IS_GNUCXX )
\r
107 add_definitions( -Wall )
\r
108 + set_target_properties( ${PROJECT_NAME} PROPERTIES LINK_FLAGS -Wl,--as-needed )
\r
111 set_source_files_properties( MainWindow.cpp PROPERTIES COMPILE_DEFINITIONS FLIGHTCREW_FULL_VERSION="${FLIGHTCREW_FULL_VERSION}" )
\r
113 WORKING_DIRECTORY ${WORK_DIR}
\r
114 DEPENDS addframeworks )
\r
117 + # these rules are so that we don't do any crazy installer
\r
118 + # building which we've stripped out anyway
\r
119 + set( WORK_DIR "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" )
\r
120 # For Linux and Windows, provide binary installers.
\r
121 # For this to work on Linux, InstallJammer needs to be installed and on the system path.
\r
122 # For this to work on Windows, Inno Setup's iscc compiler needs to be installed and on the system path.
\r
123 --- a/src/FlightCrew/tests/CMakeLists.txt
124 +++ b/src/FlightCrew/tests/CMakeLists.txt
126 # That means that subdirs inherit the include_directories of their parents.
\r
127 # So techincally we don't need to include Xerces etc.
\r
128 include_directories( ${CMAKE_CURRENT_BINARY_DIR}
\r
129 - ${CMAKE_CURRENT_SOURCE_DIR}
\r
130 - ../../BoostParts
\r
132 ../../XercesExtensions
\r
133 - ../../googlemock/include
\r
134 - ../../googlemock/gtest/include
\r
136 + /usr/include/gtest/
\r
138 + ${CMAKE_CURRENT_SOURCE_DIR}
\r
141 link_directories ( ${PROJECT_BINARY_DIR}/lib )
\r
144 add_executable( ${PROJECT_NAME} ${TEST_SOURCES} )
\r
146 -target_link_libraries( ${PROJECT_NAME} FlightCrew gmock )
\r
147 +add_library( GOOGLE_MOCK_LIB STATIC /usr/src/gmock/src/gmock-all.cc /usr/src/gtest/src/gtest-all.cc)
\r
149 +target_link_libraries( ${PROJECT_NAME} FlightCrew GOOGLE_MOCK_LIB )
\r
151 #############################################################################
\r
156 # needed for correct Xerces header inclusion
\r
157 -add_definitions( -DXERCES_STATIC_LIBRARY )
\r
158 +# add_definitions( -DXERCES_STATIC_LIBRARY )
\r
160 #############################################################################
\r
162 --- a/src/XercesExtensions/CMakeLists.txt
163 +++ b/src/XercesExtensions/CMakeLists.txt
165 # We need to pick up the stdafx.h file
\r
166 # and the headers for the linked-to libraries
\r
167 include_directories( ${CMAKE_CURRENT_SOURCE_DIR}
\r
174 link_directories ( ${PROJECT_BINARY_DIR}/lib )
\r
176 add_library( ${PROJECT_NAME} ${SOURCES} )
\r
178 -target_link_libraries( ${PROJECT_NAME} Xerces )
\r
179 +find_library(LIB_XERCES xerces-c)
\r
180 +target_link_libraries( ${PROJECT_NAME} ${LIB_XERCES} )
\r
182 #############################################################################
\r
186 # "Print all warnings" flag for GCC
\r
187 elseif( CMAKE_COMPILER_IS_GNUCXX )
\r
188 + SET_TARGET_PROPERTIES( ${PROJECT_NAME} PROPERTIES COMPILE_FLAGS -fPIC)
\r
189 add_definitions( -Wall )
\r
192 # needed for correct Xerces header inclusion
\r
193 -add_definitions( -DXERCES_STATIC_LIBRARY )
\r
194 +# add_definitions( -DXERCES_STATIC_LIBRARY )
\r
196 --- a/src/zipios/CMakeLists.txt
197 +++ b/src/zipios/CMakeLists.txt
200 add_library( ${PROJECT_NAME} ${SOURCES} )
\r
202 -target_link_libraries( ${PROJECT_NAME} zlib BoostParts )
\r
204 +find_library(LIB_ZLIB z)
\r
205 +find_library(BOOST_DT boost_date_time)
\r
206 +find_library(BOOST_FS boost_filesystem)
\r
207 +find_library(BOOST_PO boost_program_options)
\r
208 +find_library(BOOST_RE boost_regex)
\r
209 +find_library(BOOST_S boost_system)
\r
210 +find_library(BOOST_T boost_thread)
\r
211 +target_link_libraries( ${PROJECT_NAME} ${LIB_ZLIB} ${BOOST_DT} ${BOOST_FS} ${BOOST_PO} ${BOOST_RE} ${BOOST_S} ${BOOST_T})
\r
213 #############################################################################
\r
217 # "Print all warnings" flag for GCC
\r
218 elseif( CMAKE_COMPILER_IS_GNUCXX )
\r
219 + SET_TARGET_PROPERTIES( ${PROJECT_NAME} PROPERTIES COMPILE_FLAGS -fPIC)
\r
220 add_definitions( -Wall )
\r