mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
CMake: Move panda version logic to dtoolbase
This commit is contained in:
parent
9f46d3dc48
commit
b08ab6324e
@ -1,4 +1,10 @@
|
||||
configure_file(pandaVersion.h.in pandaVersion.h)
|
||||
configure_file(checkPandaVersion.h.in checkPandaVersion.h)
|
||||
configure_file(checkPandaVersion.cxx.in checkPandaVersion.cxx)
|
||||
|
||||
set(P3DTOOLBASE_HEADERS
|
||||
${CMAKE_CURRENT_BINARY_DIR}/checkPandaVersion.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/pandaVersion.h
|
||||
addHash.I addHash.h
|
||||
atomicAdjust.h
|
||||
atomicAdjustDummyImpl.h atomicAdjustDummyImpl.I
|
||||
@ -38,6 +44,7 @@ set(P3DTOOLBASE_HEADERS
|
||||
)
|
||||
|
||||
set(P3DTOOLBASE_SOURCES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/checkPandaVersion.cxx
|
||||
addHash.cxx
|
||||
atomicAdjustDummyImpl.cxx
|
||||
atomicAdjustI386Impl.cxx
|
||||
@ -74,6 +81,8 @@ add_component_library(p3dtoolbase SYMBOL BUILDING_DTOOL_DTOOLBASE
|
||||
# The extensions need py_panda.h and extension.h from interrogatedb
|
||||
target_include_directories(p3dtoolbase PUBLIC
|
||||
$<TARGET_PROPERTY:p3interrogatedb,INTERFACE_INCLUDE_DIRECTORIES>)
|
||||
# Help other libraries find the autogenerated version headers
|
||||
target_include_directories(p3dtoolbase PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
|
||||
target_use_packages(p3dtoolbase THREADS EIGEN)
|
||||
target_interrogate(p3dtoolbase ${P3DTOOLBASE_SOURCES} EXTENSIONS ${P3DTOOLBASE_IGATEEXT})
|
||||
|
||||
|
@ -18,4 +18,4 @@
|
||||
|
||||
#include "dtoolbase.h"
|
||||
|
||||
EXPCL_DTOOL_DTOOLUTIL int @PANDA_VERSION_SYMBOL@ = 0;
|
||||
EXPCL_DTOOL_DTOOLBASE int @PANDA_VERSION_SYMBOL@ = 0;
|
@ -28,7 +28,7 @@
|
||||
|
||||
#include "dtoolbase.h"
|
||||
|
||||
extern EXPCL_DTOOL_DTOOLUTIL int @PANDA_VERSION_SYMBOL@;
|
||||
extern EXPCL_DTOOL_DTOOLBASE int @PANDA_VERSION_SYMBOL@;
|
||||
|
||||
#ifndef WIN32
|
||||
/* For Windows, exporting the symbol from the DLL is sufficient; the
|
@ -1,10 +1,4 @@
|
||||
configure_file(pandaVersion.h.in pandaVersion.h)
|
||||
configure_file(checkPandaVersion.h.in checkPandaVersion.h)
|
||||
configure_file(checkPandaVersion.cxx.in checkPandaVersion.cxx)
|
||||
|
||||
set(P3DTOOLUTIL_HEADERS
|
||||
${CMAKE_CURRENT_BINARY_DIR}/checkPandaVersion.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/pandaVersion.h
|
||||
config_dtoolutil.h
|
||||
dSearchPath.I dSearchPath.h
|
||||
executionEnvironment.I executionEnvironment.h filename.I
|
||||
@ -38,7 +32,6 @@ if(APPLE)
|
||||
endif()
|
||||
|
||||
set(P3DTOOLUTIL_SOURCES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/checkPandaVersion.cxx
|
||||
config_dtoolutil.cxx
|
||||
dSearchPath.cxx
|
||||
executionEnvironment.cxx filename.cxx
|
||||
@ -73,7 +66,6 @@ composite_sources(p3dtoolutil P3DTOOLUTIL_SOURCES)
|
||||
|
||||
add_component_library(p3dtoolutil SYMBOL BUILDING_DTOOL_DTOOLUTIL
|
||||
${P3DTOOLUTIL_HEADERS} ${P3DTOOLUTIL_SOURCES})
|
||||
target_include_directories(p3dtoolutil PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
|
||||
# The extensions need py_panda.h and extension.h from interrogatedb
|
||||
target_include_directories(p3dtoolutil PUBLIC
|
||||
$<TARGET_PROPERTY:p3interrogatedb,INTERFACE_INCLUDE_DIRECTORIES>)
|
||||
|
Loading…
x
Reference in New Issue
Block a user