Skip to content

Commit

Permalink
Merge branch 'cmake' into cmake-cfs-install
Browse files Browse the repository at this point in the history
Conflicts:
	direct/src/autorestart/CMakeLists.txt
	dtool/src/interrogate/CMakeLists.txt
	dtool/src/interrogatedb/CMakeLists.txt
	panda/CMakeLists.txt
	panda/src/express/CMakeLists.txt
  • Loading branch information
CFSworks committed Feb 18, 2014
2 parents 211f4cb + ea36b87 commit 493dde6
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 9 deletions.
9 changes: 6 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -40,4 +41,6 @@ if(BUILD_PANDA)
add_subdirectory(panda)
endif()

add_subdirectory(direct)
if(BUILD_DIRECT)
add_subdirectory(direct)
endif()
4 changes: 4 additions & 0 deletions direct/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
11 changes: 7 additions & 4 deletions direct/src/autorestart/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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()
3 changes: 2 additions & 1 deletion panda/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
5 changes: 4 additions & 1 deletion panda/metalibs/pandagl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()


Expand Down
4 changes: 4 additions & 0 deletions panda/src/express/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
21 changes: 21 additions & 0 deletions panda/src/wgldisplay/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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()
17 changes: 17 additions & 0 deletions panda/src/windisplay/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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()

0 comments on commit 493dde6

Please sign in to comment.