Merge branch 'cmake' into cmake-cfs-install

Conflicts:
	direct/src/autorestart/CMakeLists.txt
	dtool/src/interrogate/CMakeLists.txt
	dtool/src/interrogatedb/CMakeLists.txt
	panda/CMakeLists.txt
	panda/src/express/CMakeLists.txt
This commit is contained in:
Sam Edwards 2014-02-18 08:13:40 -07:00
commit 493dde680a
8 changed files with 65 additions and 9 deletions

View File

@ -28,8 +28,9 @@ include(Interrogate) # Defines target_interrogate AND add_python_module
include_directories("${CMAKE_BINARY_DIR}/include")
# Determine which trees to build.
option(BUILD_DTOOL "Build the dtool source tree." ON)
option(BUILD_PANDA "Build the panda source tree." ON)
option(BUILD_DTOOL "Build the dtool source tree." ON)
option(BUILD_PANDA "Build the panda source tree." ON)
option(BUILD_DIRECT "Build the direct source tree." ON)
# Include Panda3D packages
if(BUILD_DTOOL)
@ -40,4 +41,6 @@ if(BUILD_PANDA)
add_subdirectory(panda)
endif()
add_subdirectory(direct)
if(BUILD_DIRECT)
add_subdirectory(direct)
endif()

View File

@ -1,3 +1,7 @@
if(NOT BUILD_PANDA)
message(FATAL_ERROR "Cannot build direct without panda! Please enable the BUILD_PANDA option.")
endif()
# Include source directories which have C++ components:
add_subdirectory(src/directbase)
add_subdirectory(src/autorestart)

View File

@ -1,4 +1,7 @@
add_executable(autorestart autorestart.c)
set_target_properties(autorestart PROPERTIES COMPILE_DEFINITIONS WITHIN_PANDA)
target_link_libraries(autorestart p3dtool)
install(TARGETS autorestart DESTINATION bin)
if(UNIX)
add_executable(autorestart autorestart.c)
set_target_properties(autorestart PROPERTIES COMPILE_DEFINITIONS WITHIN_PANDA)
target_link_libraries(autorestart p3dtool)
install(TARGETS autorestart DESTINATION bin)
endif()

View File

@ -40,6 +40,8 @@ add_subdirectory(src/glstuff)
add_subdirectory(src/glgsg)
add_subdirectory(src/x11display)
add_subdirectory(src/glxdisplay)
add_subdirectory(src/windisplay)
add_subdirectory(src/wgldisplay)
add_subdirectory(src/movies)
add_subdirectory(src/audio)
add_subdirectory(src/chan)
@ -66,7 +68,6 @@ add_subdirectory(metalibs/panda)
add_subdirectory(metalibs/pandagl)
add_subdirectory(metalibs/pandaegg)
# Now add the Python modules:
set(CORE_MODULE_COMPONENTS
p3chan p3char p3collide p3cull p3device p3dgraph p3display p3downloader

View File

@ -11,7 +11,10 @@ if(HAVE_GL)
set(PANDAGL_LINK_TARGETS p3glgsg)
if(HAVE_GLX)
set(PANDAGL_LINK_TARGETS ${PANDAGL_LINK_TARGETS} p3glxdisplay)
list(APPEND PANDAGL_LINK_TARGETS p3glxdisplay)
endif()
if(HAVE_WGL)
list(APPEND PANDAGL_LINK_TARGETS p3wgldisplay)
endif()

View File

@ -130,6 +130,10 @@ target_link_libraries(p3express p3pandabase p3dtool p3dtoolconfig
${_TAR_LIBRARY})
target_interrogate(p3express ALL)
if(WIN32)
target_link_libraries(p3express advapi32.lib ws2_32.lib)
endif()
install(TARGETS p3express DESTINATION lib)
#add_executable(p3expressTestTypes test_types.cxx)

View File

@ -0,0 +1,21 @@
if(HAVE_WGL)
set(P3WGLDISPLAY_HEADERS
config_wgldisplay.h
wglGraphicsBuffer.I wglGraphicsBuffer.h
wglGraphicsPipe.I wglGraphicsPipe.h
wglGraphicsStateGuardian.I wglGraphicsStateGuardian.h
wglGraphicsWindow.I wglGraphicsWindow.h
wglext.h)
set(P3WGLDISPLAY_SOURCES
config_wgldisplay.cxx
wglGraphicsBuffer.cxx
wglGraphicsPipe.cxx
wglGraphicsStateGuardian.cxx
wglGraphicsWindow.cxx)
composite_sources(p3wgldisplay P3WGLDISPLAY_SOURCES)
add_library(p3wgldisplay ${P3WGLDISPLAY_HEADERS} ${P3WGLDISPLAY_SOURCES})
target_link_libraries(p3wgldisplay p3display p3putil p3windisplay p3glgsg)
endif()

View File

@ -0,0 +1,17 @@
if(WIN32)
set(P3WINDISPLAY_HEADERS
config_windisplay.h
winGraphicsPipe.I winGraphicsPipe.h
winGraphicsWindow.I winGraphicsWindow.h
winDetectDx.h)
set(P3WINDISPLAY_SOURCES
config_windisplay.cxx winGraphicsPipe.cxx
winGraphicsWindow.cxx
winDetectDx9.cxx winDetectDx8.cxx)
composite_sources(p3windisplay P3WINDISPLAY_SOURCES)
add_library(p3windisplay ${P3WINDISPLAY_HEADERS} ${P3WINDISPLAY_SOURCES})
target_link_libraries(p3windisplay p3display p3putil
Coreimm.lib)
endif()