mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 00:32:57 -04:00
CMake: Add temporary solution for generating dtool_config.h
Eventually, we'll want to customize dtool_config.h based on the configuration being used, but this should be good enough for now.
This commit is contained in:
parent
3eb1895811
commit
20db4115b8
@ -15,6 +15,12 @@ enable_testing()
|
|||||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules/")
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules/")
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/macros/")
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/macros/")
|
||||||
|
|
||||||
|
if(CMAKE_VERSION VERSION_GREATER "3.8")
|
||||||
|
# When using the Xcode generator, don't append the platform name to the
|
||||||
|
# intermediate configuration directory.
|
||||||
|
set_property(GLOBAL PROPERTY XCODE_EMIT_EFFECTIVE_PLATFORM_NAME OFF)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Include global modules needed for configure scripts
|
# Include global modules needed for configure scripts
|
||||||
include(PackageConfig) # Defines package_option
|
include(PackageConfig) # Defines package_option
|
||||||
|
|
||||||
|
@ -193,7 +193,14 @@ else()
|
|||||||
set(intdir "${CMAKE_BUILD_TYPE}")
|
set(intdir "${CMAKE_BUILD_TYPE}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
configure_file(dtool_config.h.in "${PROJECT_BINARY_DIR}/${intdir}/include/dtool_config.h")
|
configure_file(dtool_config.h.in "${PROJECT_BINARY_DIR}/include/dtool_config.h")
|
||||||
|
|
||||||
|
# TODO: Add the ability to customize dtool_config.h based on configuration.
|
||||||
|
if(IS_MULTICONFIG)
|
||||||
|
file(GENERATE OUTPUT "${PROJECT_BINARY_DIR}/$<CONFIG>/include/dtool_config.h"
|
||||||
|
INPUT "${PROJECT_BINARY_DIR}/include/dtool_config.h")
|
||||||
|
endif()
|
||||||
|
|
||||||
install(FILES "${PROJECT_BINARY_DIR}/${intdir}/include/dtool_config.h"
|
install(FILES "${PROJECT_BINARY_DIR}/${intdir}/include/dtool_config.h"
|
||||||
COMPONENT CoreDevel
|
COMPONENT CoreDevel
|
||||||
DESTINATION include/panda3d)
|
DESTINATION include/panda3d)
|
||||||
|
@ -24,5 +24,9 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
configure_file(panda.prc.in "${CMAKE_BINARY_DIR}/etc/20_panda.prc")
|
configure_file(panda.prc.in "${CMAKE_BINARY_DIR}/etc/20_panda.prc")
|
||||||
|
if(IS_MULTICONFIG)
|
||||||
|
file(GENERATE OUTPUT "${PROJECT_BINARY_DIR}/$<CONFIG>/etc/20_panda.prc"
|
||||||
|
INPUT "${PROJECT_BINARY_DIR}/etc/20_panda.prc")
|
||||||
|
endif()
|
||||||
|
|
||||||
install(FILES "${CMAKE_BINARY_DIR}/etc/20_panda.prc" COMPONENT Core DESTINATION etc)
|
install(FILES "${CMAKE_BINARY_DIR}/etc/20_panda.prc" COMPONENT Core DESTINATION etc)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user