mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00

By "flatten" I mean that component libraries aren't referenced by genex anymore; instead, their include directories and libraries are copied out of their interfaces and into the interface of the metalib. This prepares for exporting our targets, by making sure that the component libraries don't have to be installed for CMake to be able to export metalibs.
33 lines
970 B
CMake
33 lines
970 B
CMake
if(HAVE_GL)
|
|
# Check that we actually have a display subsystem.
|
|
if(NOT HAVE_WGL AND NOT HAVE_COCOA AND NOT HAVE_CARBON AND NOT HAVE_GLX)
|
|
message("") # Add extra line before error
|
|
message(SEND_ERROR
|
|
"When compiling with OpenGL (HAVE_GL), at least one of:
|
|
HAVE_WGL, HAVE_COCOA, HAVE_CARBON, or HAVE_GLX must be defined.")
|
|
endif()
|
|
|
|
set(PANDAGL_LINK_TARGETS p3glgsg p3glstuff)
|
|
|
|
if(HAVE_GLX)
|
|
list(APPEND PANDAGL_LINK_TARGETS p3glxdisplay p3x11display)
|
|
endif()
|
|
|
|
if(HAVE_WGL)
|
|
list(APPEND PANDAGL_LINK_TARGETS p3wgldisplay p3windisplay)
|
|
endif()
|
|
|
|
if(HAVE_COCOA)
|
|
list(APPEND PANDAGL_LINK_TARGETS p3cocoadisplay)
|
|
endif()
|
|
|
|
if(HAVE_CARBON)
|
|
list(APPEND PANDAGL_LINK_TARGETS p3osxdisplay)
|
|
endif()
|
|
|
|
add_metalib(pandagl ${MODULE_TYPE} pandagl.cxx COMPONENTS ${PANDAGL_LINK_TARGETS})
|
|
set_target_properties(pandagl PROPERTIES DEFINE_SYMBOL BUILDING_PANDAGL)
|
|
|
|
install(TARGETS pandagl DESTINATION ${MODULE_DESTINATION})
|
|
endif()
|