Commit Graph

80 Commits

Author SHA1 Message Date
rdb 79d6727077 Move MAIN_DIR initialization code from interrogate to panda3d
Using the new -init flag, see panda3d/interrogate#3
2025-02-02 20:11:32 +01:00
rdb c9cddb8d92 CMake: Stop building interrogate from tree
Instead, either build it externally (BUILD_INTERROGATE) or accept INTERROGATE_EXECUTABLE / INTERROGATE_MODULE_EXECUTABLE settings
2024-08-10 16:54:12 +02:00
rdb 92db1840f9 net: Prepare to split these classes out into panda3d.net module
See #1466 - these classes are still part of panda3d.core as of 1.11, but they should really be imported from panda3d.net (they can be imported from either place in 1.11).  A future release will remove them from panda3d.core entirely.
2024-03-02 13:41:23 +01:00
rdb b221b492f7 CMake: pass full module name to interrogate_module 2024-03-02 13:41:23 +01:00
Leandro (Cerberus1746) Benedet Garcia 5f7809469c general: removed all WIN32, WIN32_VC and friends 2020-02-05 22:45:03 -07:00
Sam Edwards 1046b122a3 CMake: Fix Interrogate macro sometimes passing -D'' 2020-01-22 02:36:41 -07:00
Sam Edwards f92b88f35b CMake: Omit Interrogate-generated sources from unity builds
This fixes an include path error when building under a
multi-configuration generator and with CMake 3.16+
2020-01-06 17:12:00 -07:00
Sam Edwards 13a19109d4 CMake: Remove redundant -DNDEBUG
This reverts a42f1a49a4, which should
have been reverted by faced9aa49.
2019-08-31 15:07:03 -06:00
Sam Edwards faced9aa49 CMake: Grab all CMAKE_CXX_FLAGS(_<CONFIG>) -Ddefines for Interrogate 2019-08-30 16:53:45 -06:00
Sam Edwards a42f1a49a4 CMake: Interrogate needs -DNDEBUG when -DNDEBUG is passed as a flag
Some buildsystems (Gentoo's Portage, to be specific) are very
roughshod about how they use CMake, and might bypass the
"configuration types" system altogether, passing their own release
flags instead. This change detects that and ensures that Interrogate
picks up the NDEBUG flag when it's specified manually.
2019-08-29 23:09:28 -06:00
Sam Edwards 55cfc6c2b9 CMake: Pass _MSC_VER to Interrogate under MSVC 2019-08-24 18:07:07 -06:00
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 2d5bdb3515,
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