Donny Lawrence
89bc83c48f
CMake: Suppress $(EFFECTIVE_PLATFORM_NAME).
2019-06-27 17:38:18 -06:00
Sam Edwards
24ba0d0e72
CMake: Fix Interrogate macro not working on CMake 3.0.2
2019-06-25 03:34:51 -06:00
Sam Edwards
1a237670e3
CMake: Make Interrogate macro ensure output directories exist
...
This was causing problems on the Xcode generator under macOS,
which wasn't automatically creating the output directories
for us.
2019-06-05 02:27:48 -06:00
Sam Edwards
81f0fb78f2
CMake: Fix Interrogate macro not working on Windows
...
This was broken by 2d5bdb351557ed1ee51e4026aac26e251045c2a0,
which wrote -D flags as -D'symbol' -- this choked Windows,
so this commit turns it off in that case.
It's a shame there's no generator expression to escape quotes,
otherwise this hack wouldn't even be needed.
2019-06-03 22:02:54 -06:00
Sam Edwards
2d5bdb3515
CMake: Fix Interrogate macro's -D flag generator
...
This wraps everything in 'single-quotes' so that defines that
contain spaces and/or double-quotes work properly.
2019-06-02 01:37:48 -06:00
Sam Edwards
f744951d25
CMake: Make Interrogate invocation friendly to multi-config generators
2019-04-27 22:45:51 -06:00
Sam Edwards
b3f5c38ef3
CMake: Remove references to "panda3d" from Interrogate
2019-04-14 23:10:49 -06:00
Sam Edwards
6097d34ead
CMake: Neatly format everything for readability and consistency
2019-04-14 22:37:18 -06:00
Sam Edwards
edb9cb31a5
CMake: Exclude .c files from Interrogate
2019-01-12 15:00:01 -07:00
Sam Edwards
8b6a2cfd09
CMake: Update add_python_module to support COMPONENT
2018-12-06 17:48:03 -07:00
Sam Edwards
b3e257746e
CMake: Oops, fix where panda3d
Python package goes
2018-12-05 19:51:04 -07:00
Sam Edwards
58dd889165
CMake: Simplify Interrogate.cmake's add_python_module() keyword handling
2018-12-05 18:56:29 -07:00
Sam Edwards
9be6b6b314
CMake: Work around bug in CMake 3.0.2
...
CMake versions that old insist that source files
in the binary directory be specified absolutely
or do not contain `..`, so we do the former.
2018-11-28 14:05:32 -07:00
Sam Edwards
7f8d7366dc
CMake: Update for upstream Interrogate changes
...
- "igateruntime" is no longer a thing
- interrogate_module embeds a preamble; we have to provide it
- WindowProperties now has an extension
2018-11-12 19:16:28 -07:00
Sam Edwards
7de4b39f6e
CMake: Put generated Interrogate files under the right build directory
...
That is, they should appear under the build directory of the
component library they're Interrogating; this is just an
organizational change to keep the cmake/panda/ directory from
accumulating Interrogate clutter.
2018-11-02 01:20:03 -06:00
Sam Edwards
8610b2fceb
CMake: Simplify Interrogate's compiler definition discovery
...
This uses generator expressions to make sure the definitions are
discovered transitively. The output _igate.cxx file also has its
definitions applied to it via a source file property rather than
via add_definitions(), which prevents them from leaking to other
targets.
2018-10-13 15:06:57 -06:00
Sam Edwards
53920e7aee
CMake: Move __init__.py generation to Python.cmake
...
This also allows us to generate a suitable __init__.py for fixing
up PATH and/or __path__ on platforms that need it to properly
import Python extension modules.
2018-09-28 21:24:26 -06:00
Sam Edwards
2e2a8eae98
CMake: Byte-compile all .py files when building Panda
...
This also involves the creation a new include: Python.cmake
This file will contain utility functions for building Python
modules and installing Python packages.
2018-09-28 17:15:56 -06:00
Sam Edwards
1520d712d4
CMake: Remove target_use_packages
...
Instead, let's use a PKG::PKGNAME interface library, which simplifies
the linking and also allows us to use imported libraries from
find_package in the future.
2018-09-21 10:17:05 -06:00
Sam Edwards
cf26888672
CMake: Stop using include_directories()
...
Setting this directly on the target is cleaner,
and in most cases, the INTERFACE_INCLUDE_DIRECTORIES
mechanism takes care of it for us.
2018-09-18 18:17:43 -06:00
Sam Edwards
193cf71233
CMake: Pass Python extension files to Interrogate with relative paths
...
This makes sure absolute paths don't show up in #include,
since Interrogate doesn't (currently) use the proper representation
for this. (See #386 )
2018-09-07 00:34:02 -06:00
Sam Edwards
9f55b9e77e
CMake: Don't Interrogate with deprecated -longlong on Windows
2018-09-07 00:33:52 -06:00
Sam Edwards
e501d20927
CMake: Don't compile Interrogate runtime code into interrogatedb
...
This should obviate the need for pystub as well.
Note that it's currently a little bit hacky; the source will
have to be moved to make the CMake dependencies work better.
2018-09-06 23:57:53 -06:00
Sam Edwards
1970751c8a
CMake: Do something sensible with static Python modules
...
These *do* make sense and there are Panda3D users that use
this kind of configuration, so we should try to be accommodating.
2018-09-03 21:04:40 -06:00
Sam Edwards
77018c5383
CMake: Name Python targets more distinctively
...
Python targets are now prefixed with "panda3d." in
e.g. "panda3d.core"
2018-09-03 21:01:54 -06:00
Sam Edwards
76378c8990
CMake: Ask Python for preferred binary extension suffix
2018-08-19 23:10:20 -06:00
Sam Edwards
29bc62bf9b
CMake: Alias Interrogate
...
This allows us to have a different name for Interrogate
on the host vs. Interrogate on the target platform, which
facilitates cross-compiling.
2018-06-13 21:07:56 -06:00
Sam Edwards
21a30a8429
CMake: Make INTERROGATE_PYTHON_INTERFACE option dependent
...
This also makes it sufficient for turning on Interrogate.
2018-06-13 21:07:56 -06:00
Sam Edwards
538c615abe
CMake: Light tidying in Interrogate.cmake
2018-05-14 19:07:27 -06:00
Sam Edwards
8e230495a1
CMake: Consolidate "module or static" library logic
2018-05-14 19:07:27 -06:00
Sam Edwards
218d0e8ade
CMake: Build dtool metalibs as metalibs
2018-04-19 00:07:08 -06:00
Sam Edwards
7590c37f0c
CMake: Have Interrogate respect INTERFACE_COMPILE_DEFINITIONS
...
This commit isn't technically quite right, since Interrogate should
use the definitions from COMPILE_DEFINITIONS but the module should
be built with INTERFACE_COMPILE_DEFINITIONS, but whatever. That can
be changed if it becomes a nuisance later on.
The rationale here is it's consistent with how CMake treats these
two properties.
2018-04-18 12:23:18 -06:00
Sam Edwards
c0b8b3c542
CMake: Interrogate bugfix for LINK and IMPORT keywords together
2018-04-15 00:35:49 -06:00
Sam Edwards
cfd603bb8d
CMake: Build Python binary modules as MODULE, never SHARED
2018-04-05 16:11:59 -06:00
Sam Edwards
411e0ee93f
CMake: Use interrogate's -import instead of linking directly
2018-04-05 16:11:59 -06:00
Sam Edwards
0783013ecd
CMake: Custom targets don't need EXCLUDE_FROM_ALL
2018-02-18 20:24:27 -07:00
Sam Edwards
6907eb5207
CMake: Fix Interrogate -module panda3d.${module} flag missing
2018-02-18 03:57:56 -07:00
Sam Edwards
2399655920
CMake: Make sure Interrogate doesn't see package include directories
2018-02-17 16:56:35 -07:00
Sam Edwards
f8c63dbe2b
CMake: Refactor interrogate.cmake a little
...
In particular, rely on INTERROGATE_PYTHON_INTERFACE, not
HAVE_PYTHON AND HAVE_INTERROGATE.
2018-02-11 12:48:17 -07:00
Sam Edwards
b68b6caeb0
CMake: Support targeting Python 3
2018-02-09 22:06:14 -07:00
Sam Edwards
d66f5fa8e2
CMake: Kill support for <2.8.12
...
The rationale for this is in a comment at the top of the main
CMakeLists.txt file. It was getting harder to maintain support for a
version this old, and pretty much no current system has CMake <3.
Good riddance.
2018-02-06 14:47:12 -07:00
Sam Edwards
e46890010a
cmake: Don't rely on $<TARGET_PROPERTY:...> in CMake < 2.8.10.
2016-12-02 20:41:22 -08:00
Sam Edwards
e58697bee4
cmake: Fix AutoInclude workaround always being used irrespective of version.
...
Also fixes Interrogate's reliance on the INTERFACE_INCLUDE_DIRECTORIES target
property before generation time by using a generator expression to determine
Interrogate's include flags.
2016-12-01 02:36:40 -08:00
Sam Edwards
0d13247721
Merge branch 'cmake' into cmake-proper-interrogate
...
Conflicts:
cmake/macros/Interrogate.cmake
panda/src/express/CMakeLists.txt
panda/src/ode/CMakeLists.txt
2014-07-26 19:12:22 -07:00
Sam Edwards
a26df45c38
cmake: Fix Interrogate installation so that runtime paths are properly removed.
2014-04-28 16:21:10 -06:00
Sam Edwards
c82c0df266
cmake: Fix Interrogate macro bug causing component sources to get scanned along with their composite counterparts.
2014-04-16 06:07:55 -06:00
Sam Edwards
b300848589
CMake: Add new "EXTENSIONS" syntax to target_interrogate(...) macro.
2014-03-30 04:49:52 -06:00
Sam Edwards
3969d0e1ac
CMake: Link Interrogate bindings against metalibs.
2014-03-02 18:33:00 -07:00
Sam Edwards
9fc2e6829b
CMake: Generate and install 'pandac' for backwards-compatibility.
2014-02-07 14:30:46 -07:00
Sam Edwards
e5a6259e46
CMake: Get Interrogated modules to install.
2014-02-06 16:33:34 -07:00