|
19 | 19 | <cmake.download.binaries>false</cmake.download.binaries>
|
20 | 20 | <!-- cmake maven plugin -->
|
21 | 21 | <cmake.classifier>linux-x86_64</cmake.classifier>
|
22 |
| - <!--FIXME "Makefiles" parameter MUST be optional see cmake-maven-project/cmake-maven-project#7 --> |
23 |
| - <cmake.generator>Unix Makefiles</cmake.generator> |
| 22 | + <!--FIXME "Makefiles" parameter MUST be optional see cmake-maven-project/cmake-maven-project#7 --> |
| 23 | + <cmake.generator>Unix Makefiles</cmake.generator> |
| 24 | + <!-- Additional command-line options, last prevents warnings on unused options --> |
| 25 | + <!--FIXME empty option tag throw NPE see cmake-maven-project/cmake-maven-project#24 --> |
| 26 | + <cmake.option.first>-DFIRST=empty</cmake.option.first> |
| 27 | + <cmake.option.second>-DSECOND=empty</cmake.option.second> |
| 28 | + <cmake.option.third>-DTHIRD=empty</cmake.option.third> |
| 29 | + <cmake.option.fourth>-DFOURTH=empty</cmake.option.fourth> |
| 30 | + <cmake.option.last>--no-warn-unused-cli</cmake.option.last> |
24 | 31 | <!-- native lib loader (dependency) -->
|
25 | 32 | <native.lib.directory>linux_64</native.lib.directory>
|
26 | 33 | </properties>
|
|
91 | 98 | <targetPath>${project.build.directory}/cmake</targetPath>
|
92 | 99 | <!--FIXME "Makefiles" parameter MUST be optional see cmake-maven-project/cmake-maven-project#7 -->
|
93 | 100 | <generator>${cmake.generator}</generator>
|
94 |
| - <!--TODO Use -DCMAKE_TOOLCHAIN_FILE file for cross-compile |
95 | 101 | <options>
|
96 |
| - <option>-DCMAKE_TOOLCHAIN_FILE=toolchain/Mingw64.cmake</option> |
| 102 | + <option>${cmake.option.first}</option> |
| 103 | + <option>${cmake.option.second}</option> |
| 104 | + <option>${cmake.option.third}</option> |
| 105 | + <option>${cmake.option.fourth}</option> |
| 106 | + <option>${cmake.option.last}</option> |
97 | 107 | </options>
|
98 |
| - --> |
99 | 108 | </configuration>
|
100 | 109 | </execution>
|
101 | 110 |
|
|
162 | 171 | </os>
|
163 | 172 | </activation>
|
164 | 173 | <properties>
|
| 174 | + <native.lib.directory>windows_64</native.lib.directory> |
165 | 175 | <cmake.root.dir>${env.PROGRAMFILES}/CMake</cmake.root.dir>
|
166 | 176 | <!--FIXME "Makefiles" parameter MUST be optional see cmake-maven-project/cmake-maven-project#7 -->
|
167 | 177 | <cmake.generator>Visual Studio 14 2015</cmake.generator>
|
168 | 178 | <cmake.classifier>windows-x86_64</cmake.classifier>
|
| 179 | + <cmake.option.first>--config Release</cmake.option.first> |
| 180 | + <cmake.option.second>-DCMAKE_GENERATOR_PLATFORM=x64</cmake.option.second> |
| 181 | + <cmake.option.third>-DNATIVE_LIB_DIR=${native.lib.directory}</cmake.option.third> |
| 182 | + </properties> |
| 183 | + </profile> |
| 184 | + |
| 185 | + <!-- cmake windows-x86 profile --> |
| 186 | + <profile> |
| 187 | + <id>cmake-win32</id> |
| 188 | + <activation> |
| 189 | + <os> |
| 190 | + <family>Windows</family> |
| 191 | + <arch>x86</arch> |
| 192 | + </os> |
| 193 | + </activation> |
| 194 | + <properties> |
| 195 | + <native.lib.directory>windows_32</native.lib.directory> |
| 196 | + <cmake.root.dir>${env.PROGRAMFILES}/CMake</cmake.root.dir> |
| 197 | + <!--FIXME "Makefiles" parameter MUST be optional see cmake-maven-project/cmake-maven-project#7 --> |
| 198 | + <cmake.generator>Visual Studio 14 2015</cmake.generator> |
| 199 | + <cmake.classifier>windows-x86_32</cmake.classifier> |
| 200 | + <cmake.option.first>--config Release</cmake.option.first> |
| 201 | + <cmake.option.second>-DNATIVE_LIB_DIR=${native.lib.directory}</cmake.option.second> |
| 202 | + </properties> |
| 203 | + </profile> |
| 204 | + |
| 205 | + <!-- mingw32 profile --> |
| 206 | + <!-- TODO: Untested. Test this mingw32 profile: "mvn -P cmake-mingw32 install" --> |
| 207 | + <profile> |
| 208 | + <id>cmake-mingw32</id> |
| 209 | + <properties> |
| 210 | + <native.lib.directory>windows_32</native.lib.directory> |
| 211 | + <cmake.generator>Unix Makefiles</cmake.generator> |
| 212 | + <cmake.classifier>windows-x86_32</cmake.classifier> |
| 213 | + <cmake.option.first>-DCMAKE_TOOLCHAIN_FILE=toolchain/Mingw32.cmake</cmake.option.first> |
| 214 | + <cmake.option.second>-DNATIVE_LIB_DIR=${native.lib.directory}</cmake.option.second> |
| 215 | + </properties> |
| 216 | + </profile> |
| 217 | + |
| 218 | + <!-- mingw64 profile --> |
| 219 | + <!-- TODO: Untested. Test this mingw64 profile: "mvn -P cmake-mingw64 install" --> |
| 220 | + <profile> |
| 221 | + <id>cmake-mingw64</id> |
| 222 | + <properties> |
169 | 223 | <native.lib.directory>windows_64</native.lib.directory>
|
| 224 | + <cmake.generator>Unix Makefiles</cmake.generator> |
| 225 | + <cmake.classifier>windows-x86_64</cmake.classifier> |
| 226 | + <cmake.option.first>-DCMAKE_TOOLCHAIN_FILE=toolchain/Mingw64.cmake</cmake.option.first> |
| 227 | + <cmake.option.second>-DNATIVE_LIB_DIR=${native.lib.directory}</cmake.option.second> |
170 | 228 | </properties>
|
171 | 229 | </profile>
|
172 | 230 |
|
|
183 | 241 | <cmake.root.dir>/usr/local</cmake.root.dir>
|
184 | 242 | <cmake.classifier>mac-x86_64</cmake.classifier>
|
185 | 243 | <native.lib.directory>osx_64</native.lib.directory>
|
| 244 | + <cmake.option.first>-DNATIVE_LIB_DIR=${native.lib.directory}</cmake.option.first> |
186 | 245 | </properties>
|
187 | 246 |
|
188 | 247 | </profile>
|
|
0 commit comments