forked from RooieDirk/NmeaConverter_pi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
230 lines (217 loc) · 5.92 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
#---------------------------------------------------------------------------
# Author: Pavel Kalian
# Copyright: 2014
# License: GPLv2 License
#---------------------------------------------------------------------------
#define minimum cmake version
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.2)
PROJECT(nmeaconverter_pi)
SET(PACKAGE_NAME nmeaconverter_pi)
SET(VERBOSE_NAME NmeaConverter)
SET(TITLE_NAME NmeaConverter)
SET(CPACK_PACKAGE_CONTACT "RooieDirk")
SET(VERSION_MAJOR "0")
SET(VERSION_MINOR "2")
#SET(CMAKE_BUILD_TYPE Debug)
# Definitions
add_definitions (
-D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE
-DLIBUNRAR_BUILD
-DRARDLL
-DUNRAR
-DSILENT
)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/src)
INCLUDE("cmake/PluginConfigure.cmake")
SET(SRC_NMEATRANSLATOR
src/NmeaConverter_pi.h
src/NmeaConverter_pi.cpp
src/ec_defs.h
src/ec_engine.h
src/ec_engine.cpp
)
ADD_LIBRARY(${PACKAGE_NAME} SHARED ${SRC_NMEATRANSLATOR})
INCLUDE("cmake/PluginInstall.cmake")
INCLUDE("cmake/PluginLocalization.cmake")
INCLUDE("cmake/PluginPackage.cmake")
#**************************************************************************************************
# define minimum cmake version
# CMAKE_MINIMUM_REQUIRED(VERSION 2.6.2)
# # This should be 2.8.0 to have FindGTK2 module
# IF (COMMAND cmake_policy)
# CMAKE_POLICY(SET CMP0003 OLD)
# CMAKE_POLICY(SET CMP0005 OLD)
# CMAKE_POLICY(SET CMP0011 OLD)
# ENDIF (COMMAND cmake_policy)
#
# PROJECT(NmeaConverter_pi)
#
# SET(PACKAGE_NAME NmeaConverter_pi)
# SET(PLUGIN_SOURCE_DIR .)
# MESSAGE (STATUS "*** Building ${PACKAGE_NAME} ***")
# #SET(CMAKE_BUILD_TYPE Debug)
#
# IF (PREFIX)
# SET(CMAKE_INSTALL_PREFIX ${PREFIX})
# ENDIF (PREFIX)
#
# SET(PARENT opencpn)
# SET(PREFIX_BIN bin)
# SET(PREFIX_INCLUDE include)
# SET(PREFIX_DATA share)
# SET(PREFIX_PARENTDATA ${PREFIX_DATA}/${PARENT})
#
# INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/src)
#
# # require proper c++
# #ADD_DEFINITIONS( "-Wall -ansi -pedantic -Wno-variadic-macros" )
# #TODO: Should we use -fno-stack-protector
# # IF NOT DEBUGGING CFLAGS="-O2 -march=native"
# IF(NOT WIN32)
# ADD_DEFINITIONS( "-Wall -g -fexceptions -fvisibility=hidden" )
#
# IF(NOT APPLE)
# SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,-Bsymbolic")
# ELSE(NOT APPLE)
# SET(CMAKE_SHARED_LINKER_FLAGS "-Wl")
# ENDIF(NOT APPLE)
#
# ENDIF(NOT WIN32)
#
# # Add some definitions to satisfy MS
# IF(WIN32)
# ADD_DEFINITIONS(-D__MSVC__)
# ADD_DEFINITIONS(-D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE)
# ENDIF(WIN32)
#
#
# SET(wxWidgets_USE_LIBS base core net xml html adv)
# SET(BUILD_SHARED_LIBS TRUE)
# FIND_PACKAGE(wxWidgets REQUIRED)
#
# INCLUDE(${wxWidgets_USE_FILE})
#
# FIND_PACKAGE(Gettext REQUIRED)
#
# # For convenience we define the sources as a variable. You can add
# # header files and cpp/c files and CMake will sort them out
#
#
# SET(SRC_NMEATRANSLATOR
# src/NmeaConverter_pi.h
# src/NmeaConverter_pi.cpp
# src/ec_defs.h
# src/ec_engine.h
# src/ec_engine.cpp
# )
#
#
# ADD_LIBRARY(${PACKAGE_NAME} SHARED ${SRC_NMEATRANSLATOR} )
#
# IF(WIN32)
# SET(OPENCPN_IMPORT_LIB "../../../${CMAKE_CFG_INTDIR}/${PARENT}")
# TARGET_LINK_LIBRARIES( ${PACKAGE_NAME} ${OPENCPN_IMPORT_LIB} )
# ADD_DEPENDENCIES(${PACKAGE_NAME} ${PARENT})
# ENDIF(WIN32)
#
# TARGET_LINK_LIBRARIES( ${PACKAGE_NAME} ${wxWidgets_LIBRARIES} )
#
# IF(UNIX)
# INSTALL(TARGETS ${PACKAGE_NAME} RUNTIME LIBRARY DESTINATION ${PREFIX_PARENTDATA}/plugins)
# ENDIF(UNIX)
#
# IF(WIN32)
# INSTALL(TARGETS ${PACKAGE_NAME} RUNTIME DESTINATION "plugins")
# ENDIF(WIN32)
#
#
# # define minimum cmake version
# CMAKE_MINIMUM_REQUIRED(VERSION 2.6.2)
# # This should be 2.8.0 to have FindGTK2 module
# IF (COMMAND cmake_policy)
# CMAKE_POLICY(SET CMP0003 OLD)
# CMAKE_POLICY(SET CMP0005 OLD)
# CMAKE_POLICY(SET CMP0011 OLD)
# ENDIF (COMMAND cmake_policy)
#
# PROJECT(NmeaConvertor_pi)
#
# SET(PACKAGE_NAME NmeaConvertor_pi)
# SET(PLUGIN_SOURCE_DIR ..)
# MESSAGE (STATUS "*** Building ${PACKAGE_NAME} ***")
#
# #SET(CMAKE_BUILD_TYPE Debug)
#
# IF (PREFIX)
# SET(CMAKE_INSTALL_PREFIX ${PREFIX})
# ENDIF (PREFIX)
#
# SET(PARENT opencpn)
# SET(PREFIX_BIN bin)
# SET(PREFIX_INCLUDE include)
# SET(PREFIX_DATA share)
# SET(PREFIX_PARENTDATA ${PREFIX_DATA}/${PARENT})
#
# INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/src)
#
# # require proper c++
# #ADD_DEFINITIONS( "-Wall -ansi -pedantic -Wno-variadic-macros" )
# #TODO: Should we use -fno-stack-protector
# # IF NOT DEBUGGING CFLAGS="-O2 -march=native"
# IF(NOT WIN32)
# ADD_DEFINITIONS( "-Wall -g -fexceptions -fvisibility=hidden" )
#
# IF(NOT APPLE)
# SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,-Bsymbolic")
# ELSE(NOT APPLE)
# SET(CMAKE_SHARED_LINKER_FLAGS "-Wl")
# ENDIF(NOT APPLE)
#
# ENDIF(NOT WIN32)
#
# # Add some definitions to satisfy MS
# IF(WIN32)
# ADD_DEFINITIONS(-D__MSVC__)
# ADD_DEFINITIONS(-D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE)
# ENDIF(WIN32)
#
#
# SET(wxWidgets_USE_LIBS base core net xml html adv)
# SET(BUILD_SHARED_LIBS TRUE)
# FIND_PACKAGE(wxWidgets REQUIRED)
#
# INCLUDE(${wxWidgets_USE_FILE})
#
# FIND_PACKAGE(Gettext REQUIRED)
#
# # For convenience we define the sources as a variable. You can add
# # header files and cpp/c files and CMake will sort them out
#
#
# SET(SRC_NMEACONVERTOR
# src/NmeaConverter_pi.h
# src/NmeaConverter_pi.cpp
# src/ec_defs.h
# src/ec_engine.h
# src/ec_engine.cpp
# )
#
#
# ADD_LIBRARY(${PACKAGE_NAME} SHARED ${SRC_NMEACONVERTOR} )
#
# IF(WIN32)
# SET(OPENCPN_IMPORT_LIB "../../../${CMAKE_CFG_INTDIR}/${PARENT}")
# TARGET_LINK_LIBRARIES( ${PACKAGE_NAME} ${OPENCPN_IMPORT_LIB} )
# ADD_DEPENDENCIES(${PACKAGE_NAME} ${PARENT})
# ENDIF(WIN32)
#
# TARGET_LINK_LIBRARIES( ${PACKAGE_NAME} ${wxWidgets_LIBRARIES} )
#
# IF(UNIX)
# INSTALL(TARGETS ${PACKAGE_NAME} RUNTIME LIBRARY DESTINATION ${PREFIX_PARENTDATA}/plugins)
# ENDIF(UNIX)
#
# IF(WIN32)
# INSTALL(TARGETS ${PACKAGE_NAME} RUNTIME DESTINATION "plugins")
# ENDIF(WIN32)