Commit Graph

39 Commits

Author SHA1 Message Date
wmayer
e4f8d98079 add new CMake macro generate_from_any and extend PythonToCPP script to create source file from any text file 2019-10-14 22:20:59 +02:00
ezzieyguywuf
3bc979fbc1 Reverted FreeCadMacros.cmake to what is in master. 2019-09-26 18:55:33 +02:00
ezzieyguywuf
63c45d3ba4 Move logic out of CMakeLists.txt
This is an initial pass, simply moving the existing logic as-is. Future
PR's will attempt to refactor and improve the cmake stuff.
2019-09-26 18:54:45 +02:00
wmayer
7d8c2060a8 do not force CMAKE_INSTALL_LIBDIR to be an absolute path 2019-08-22 16:57:10 +02:00
wmayer
3927a2ed8b reduce compile time after each time cmake configure is executed (Version.h) 2018-08-21 14:06:33 +02:00
wmayer
e5a1a9d35a macro to check for different input and output file and if needed replace output file 2018-08-21 13:52:42 +02:00
wmayer
16295d4121 CMake 2.8.12 and lower allowed the SOURCE signature in add_custom_command
In CMake 3.0 the policy CMP0050 was introduced where it could be set to OLD to keep this behaviour while for NEW an error was raised.
Since CMake 3.5.2 a warning comes up when using the OLD behaviour and that it will be removed in a future version.

In FreeCAD we switched to the new behaviour now and removed the SOURCE signature from add_custom_command which affects the macros
fc_copy_sources, fc_target_copy_resource and fc_target_copy_resource_flat and their usage.
It's not possible any more to add files to a target by using the macros. Now a file must be added to the target before using the macros.

This commit fixes it for Arch, Draft, OpenSCAD, Material, Plot and Ship
2018-08-20 11:47:39 +02:00
wmayer
82b31d50e5 clean up cmake macros add new macro fc_target_copy_resource_flat 2018-08-19 22:54:33 +02:00
wmayer
3ffd435526 move cmake policy CMP0050 to new style 2018-08-19 13:59:42 +02:00
wmayer
fc6e6a55ea fix broken generate_from_xml macro 2018-08-19 13:34:05 +02:00
Ryan Pavlik
bf043fe68f Fix typo in FreeCadMacros.cmake 2018-08-11 17:39:15 +02:00
Ryan Pavlik
cf79125dd6 Add fc_target_copy_resource/fc_copy_sources build message
Includes optional verbosity param for tracking down "two rules for..."
ninja/etc warnings.
2018-08-11 17:39:13 +02:00
Ryan Pavlik
2ae238e3db Clean up and fix generate_from_py and generate_from_xml CMake macros
Includes native-path-usage fixing like the previous commit.
2018-08-11 17:39:13 +02:00
Ryan Pavlik
4ffc6c2882 Clean up and improve fc_copy_sources and fc_target_copy_resource CMake macros
The previous steps of TO_NATIVE_PATH followed by ABSOLUTE
is not meaningful or reliable: output of ABSOLUTE is always in
"cmake" path format, not native path format. Native path input to
CMake commands may not do what you want.
2018-08-11 17:39:13 +02:00
Ryan Pavlik
11d89c7608 Clean up and improve "COPY_IF_DIFFERENT" CMake macro 2018-08-11 17:39:12 +02:00
Markus Hovorka
36a0b5173c Honor CMAKE_INSTALL_RPATH in SET_BIN_DIR
set_target_properties used up until now in the SET_BIN_DIR macro sets
the INSTALL_RPATH property and discards whatever it contained before.
The INSTALL_RPATH target property is initialized with the cache variable
CMAKE_INSTALL_RPATH (possilbly given via the -D option of cmake). To
preserve this "default" value this commit replaced set_target_properties
with set_property(... APPEND ...).
2017-05-31 23:08:16 +02:00
Johannes Obermayr
7ec37c9e39 Fix RPATHS for area-native and area libs on Linux. 2017-02-10 21:09:49 +01:00
wmayer
99348d3a5b + fix cmake issue caused by patch 2015-09-11 14:47:47 +02:00
Johannes Obermayr
79ae0091ad libarea doesn't depend on parts from CMAKE_INSTALL_LIBDIR
Fixes:
 -- Installing: /home/abuild/rpmbuild/BUILDROOT/FreeCAD-0.15.99+git20150727.1925-1.1.x86_64/usr/lib64/FreeCAD/lib/area.so
 CMake Error at src/Mod/Path/libarea/cmake_install.cmake:53 (file):
   file RPATH_CHANGE could not write new RPATH:

     /usr/lib64/FreeCAD/lib

   to the file:

     /home/abuild/rpmbuild/BUILDROOT/FreeCAD-0.15.99+git20150727.1925-1.1.x86_64/usr/lib64/FreeCAD/lib/area.so

   No valid ELF RPATH or RUNPATH entry exists in the file;
2015-09-11 07:18:07 +02:00
wmayer
b5475db2de + create MODULE libraries in given directory 2015-07-24 22:56:18 +02:00
wmayer
59e45e0ae9 + use .dylib for normal shared libraries under MacOSX 2015-04-17 18:13:51 +02:00
Johannes Obermayr
f050733132 Fix OCE / OCC version detection. 2014-12-20 22:41:31 +01:00
wmayer
967566acf1 + improve OCC version macro, fix build failure with MinGW, fix build failure with Coin2 2014-08-18 11:34:02 +02:00
wmayer
5a33d95526 + Add macro to test and get OCC version 2014-08-10 18:52:28 +02:00
wmayer
6b89c03181 Add initial support for different libdir (jobermayr) 2014-05-10 12:57:38 +02:00
mdinger
337f05d56e Move python module prefix and suffix properties into macro to be set together 2014-05-03 16:00:30 +02:00
wmayer
7be7310eb1 + fix PCH to work again with QtCreator 2014-04-30 19:04:32 +02:00
wmayer
7d42748082 + Fix PCH issue with VS 2014-04-30 14:07:27 +02:00
mdinger
f890d1d1cb Fix precompiled header build error 2014-04-30 13:41:19 +02:00
mdinger
8df9289d07 Add runtime location linux will use 2014-04-30 13:41:18 +02:00
mdinger
1f7743ad98 Disable null prefix on certain FreeCAD* targets 2014-04-30 13:41:18 +02:00
mdinger
88a3e5bf0e Add 4th optional parameter to set linux install path 2014-04-30 13:41:17 +02:00
mdinger
cb849b7f16 Macro now takes 2 parameters with a optional 3rd. Fixes linux prefix and part design install path. 2014-04-30 13:41:14 +02:00
mdinger
ed8ba118ea Send FreeCAD bins and libs to correct locations 2014-04-30 13:41:14 +02:00
mdinger
085736095e Insert SET_BIN_DIR macro everywhere except Mod 2014-04-30 13:41:12 +02:00
mdinger
d137a9ef05 Make macro to set bin directory. Apply to ANN, Pivy, and solomesmesh. 2014-04-30 13:41:11 +02:00
wmayer
f061b6f7ea 0001278: No build possible with current CMake version 2.8.12 2013-10-22 10:33:18 +02:00
wmayer
5f140253fa Support of INSTALL target on Windows (VC++ and MinGW) 2012-02-17 21:41:00 +01:00
wmayer
120ca87015 + unify DLL export defines to namespace names
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5000 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-10 13:44:52 +00:00