From 6e86570b9a14673bf13dc59049f3108ab5ea2e36 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 2 Feb 2014 10:12:18 +0100 Subject: [PATCH 1/8] ppremake-style output report --- dtool/LocalSetup.cmake | 278 +++++++++++++++++++++++++++++++++++++++-- dtool/Package.cmake | 3 - 2 files changed, 270 insertions(+), 11 deletions(-) diff --git a/dtool/LocalSetup.cmake b/dtool/LocalSetup.cmake index 009a45939f..43c626dcc7 100644 --- a/dtool/LocalSetup.cmake +++ b/dtool/LocalSetup.cmake @@ -180,15 +180,276 @@ else() endif() # Now go through all the packages and report whether we have them. -message(STATUS "Configuring support for the following optional third-party packages:") - -#report_package(EIGEN "Eigen linear algebra library") -if(LINMATH_ALIGN) - message("+ (vectorization enabled in build)") +message("") +message("Configuring support for the following optional third-party packages:") +if(HAVE_EIGEN) + message("+ Eigen linear algebra library") + if(LINMATH_ALIGN) + message("+ (vectorization enabled in build)") + else() + message("- (vectorization NOT enabled in build)") + endif() else() - message("- (vectorization NOT enabled in build)") + message("- Did not find Eigen linear algebra library") endif() +if(HAVE_OPENSSL) + message("+ OpenSSL") +else() + message("- Did not find OpenSSL") +endif() + +if(HAVE_JPEG) + message("+ libjpeg") +else() + message("- Did not find libjpeg") +endif() + +if(HAVE_PNG) + message("+ libpng") +else() + message("- Did not find libpng") +endif() + +if(HAVE_TIFF) + message("+ libtiff") +else() + message("- Did not find libtiff") +endif() + +if(HAVE_TAR) + message("+ libtar") +else() + message("- Did not find libtar") +endif() + +if(HAVE_FFTW) + message("+ fftw") +else() + message("- Did not find fftw") +endif() + +if(HAVE_SQUISH) + message("+ squish") +else() + message("- Did not find squish") +endif() + +if(HAVE_CG) + message("+ Nvidia Cg High Level Shading Language") +else() + message("- Did not find Nvidia Cg High Level Shading Language") +endif() + +if(HAVE_CGGL) + message("+ Cg OpenGL API") +else() + message("- Did not find Cg OpenGL API") +endif() + +if(HAVE_CGDX8) + message("+ Cg DX8 API") +else() + message("- Did not find Cg DX8 API") +endif() + +if(HAVE_CGDX9) + message("+ Cg DX9 API") +else() + message("- Did not find Cg DX9 API") +endif() + +if(HAVE_CGDX10) + message("+ Cg DX10 API") +else() + message("- Did not find Cg DX10 API") +endif() + +if(HAVE_VRPN) + message("+ VRPN") +else() + message("- Did not find VRPN") +endif() + +if(HAVE_ZLIB) + message("+ zlib") +else() + message("- Did not find zlib") +endif() + +if(HAVE_RAD_MSS) + message("+ Miles Sound System") +else() + message("- Did not find Miles Sound System") +endif() + +if(HAVE_FMODEX) + message("+ FMOD Ex sound library") +else() + message("- Did not find FMOD Ex sound library") +endif() + +if(HAVE_OPENAL) + message("+ OpenAL sound library") +else() + message("- Did not find OpenAL sound library") +endif() + +if(HAVE_PHYSX) + message("+ Ageia PhysX") +else() + message("- Did not find Ageia PhysX") +endif() + +if(HAVE_SPEEDTREE) + message("+ SpeedTree") +else() + message("- Did not find SpeedTree") +endif() + +if(HAVE_GTK) + message("+ gtk+-2") +else() + message("- Did not find gtk+-2") +endif() + +if(HAVE_FREETYPE) + message("+ Freetype") +else() + message("- Did not find Freetype") +endif() + +if(HAVE_WX) + message("+ WxWidgets") +else() + message("- Did not find WxWidgets") +endif() + +if(HAVE_FLTK) + message("+ FLTK") +else() + message("- Did not find FLTK") +endif() + +if(HAVE_GL) + message("+ OpenGL") +else() + message("- Did not find OpenGL") +endif() + +if(HAVE_GLES) + message("+ OpenGL ES 1") +else() + message("- Did not find OpenGL ES 1") +endif() + +if(HAVE_GLES2) + message("+ OpenGL ES 2") +else() + message("- Did not find OpenGL ES 2") +endif() + +if(HAVE_DX8) + message("+ DirectX8") +else() + message("- Did not find DirectX8") +endif() + +if(HAVE_DX9) + message("+ DirectX9") +else() + message("- Did not find DirectX9") +endif() + +if(HAVE_TINYDISPLAY) + message("+ Tinydisplay") +else() + message("- Not building Tinydisplay") +endif() + +if(HAVE_X11) + message("+ X11") +else() + message("- Did not find X11") +endif() + +if(HAVE_MESA) + message("+ Mesa") +else() + message("- Did not find Mesa") +endif() + +if(HAVE_OPENCV) + message("+ OpenCV") +else() + message("- Did not find OpenCV") +endif() + +if(HAVE_FFMPEG) + message("+ FFMPEG") +else() + message("- Did not find FFMPEG") +endif() + +if(HAVE_ODE) + message("+ ODE") +else() + message("- Did not find ODE") +endif() + +if(HAVE_AWESOMIUM) + message("+ AWESOMIUM") +else() + message("- Did not find AWESOMIUM") +endif() + +if(HAVE_MAYA) + message("+ OpenMaya") +else() + message("- Did not find OpenMaya") +endif() + +if(HAVE_FCOLLADA) + message("+ FCollada") +else() + message("- Did not find FCollada") +endif() + +if(HAVE_ASSIMP) + message("+ Assimp") +else() + message("- Did not find Assimp") +endif() + +if(HAVE_ARTOOLKIT) + message("+ ARToolKit") +else() + message("- Did not find ARToolKit") +endif() + +if(HAVE_ROCKET) + if(HAVE_ROCKET_PYTHON) + message("+ libRocket with Python bindings") + else() + message("+ libRocket without Python bindings") + endif() +else() + message("- Did not find libRocket") +endif() + +if(HAVE_BULLET) + message("+ Bullet Physics") +else() + message("- Did not find Bullet Physics") +endif() + +if(HAVE_VORBIS) + message("+ libvorbis (Ogg Vorbis Decoder)") +else() + message("- Did not find libvorbis (Ogg Vorbis Decoder)") +endif() + +message("") if(HAVE_INTERROGATE AND HAVE_PYTHON) message("Compilation will generate Python interfaces.") else() @@ -198,10 +459,8 @@ endif() if(HAVE_THREADS) if(SIMPLE_THREADS) message("Compilation will include simulated threading support.") - elseif(DO_PIPELINING) message("Compilation will include full, pipelined threading support.") - else() message("Compilation will include nonpipelined threading support.") endif() @@ -209,8 +468,11 @@ else() message("Configuring Panda without threading support.") endif() +message("") message("See dtool_config.h for more details about the specified configuration.") +message("") + # Generate dtool_config.h configure_file(dtool_config.h.in "${PROJECT_BINARY_DIR}/include/dtool_config.h") include_directories("${PROJECT_BINARY_DIR}/include") diff --git a/dtool/Package.cmake b/dtool/Package.cmake index 57794458b2..7a56ce1edb 100644 --- a/dtool/Package.cmake +++ b/dtool/Package.cmake @@ -1,6 +1,3 @@ -message(STATUS "") -message(STATUS "Configuring support for the following optional third-party packages:") - # Find and configure Miles Sound System find_package(Miles QUIET) #config_package(RAD_MSS "Miles Sound System") From 710568fb286e882db2376560dcd2c2d275e1bf63 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 2 Feb 2014 12:31:06 +0100 Subject: [PATCH 2/8] HAVE_GTK -> HAVE_GTK2 --- dtool/LocalSetup.cmake | 2 +- dtool/Package.cmake | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/dtool/LocalSetup.cmake b/dtool/LocalSetup.cmake index 43c626dcc7..0e64a6eeb6 100644 --- a/dtool/LocalSetup.cmake +++ b/dtool/LocalSetup.cmake @@ -307,7 +307,7 @@ else() message("- Did not find SpeedTree") endif() -if(HAVE_GTK) +if(HAVE_GTK2) message("+ gtk+-2") else() message("- Did not find gtk+-2") diff --git a/dtool/Package.cmake b/dtool/Package.cmake index 7a56ce1edb..35447f9dab 100644 --- a/dtool/Package.cmake +++ b/dtool/Package.cmake @@ -23,9 +23,8 @@ package_option(FREETYPE) set(Freetype_FIND_QUIETLY TRUE) # Fix for builtin FindGTK2 set(GTK2_GTK_FIND_QUIETLY TRUE) # Fix for builtin FindGTK2 find_package(GTK2 QUIET COMPONENTS gtk) -set(GTK_FOUND ${GTK2_FOUND}) # Mangle for convenience -#config_package(GTK "gtk+-2") -package_option(GTK) +#config_package(GTK2 "gtk+-2") +package_option(GTK2) # Find and configure WxWidgets find_package(wxWidgets QUIET) From dc898f4d78bbb77cb7d1fabc675ea352b6e540bb Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Wed, 5 Feb 2014 17:08:05 -0700 Subject: [PATCH 3/8] CMake: Add audio/movies components. --- panda/CMakeLists.txt | 23 ++++++++++++++----- panda/src/audio/CMakeLists.txt | 24 ++++++++++++++++++++ panda/src/grutil/CMakeLists.txt | 5 ++++- panda/src/movies/CMakeLists.txt | 39 +++++++++++++++++++++++++++++++++ 4 files changed, 85 insertions(+), 6 deletions(-) create mode 100644 panda/src/audio/CMakeLists.txt create mode 100644 panda/src/movies/CMakeLists.txt diff --git a/panda/CMakeLists.txt b/panda/CMakeLists.txt index f648f44d2c..650bcaede2 100644 --- a/panda/CMakeLists.txt +++ b/panda/CMakeLists.txt @@ -40,6 +40,8 @@ add_subdirectory(src/pgraph) add_subdirectory(src/pgraphnodes) add_subdirectory(src/cull) add_subdirectory(src/display) +add_subdirectory(src/movies) +add_subdirectory(src/audio) add_subdirectory(src/chan) add_subdirectory(src/char) add_subdirectory(src/dgraph) @@ -62,8 +64,19 @@ add_subdirectory(metalibs/panda) add_subdirectory(metalibs/pandagl) add_subdirectory(metalibs/pandaegg) -add_python_module(core p3chan p3char p3collide p3cull p3device p3dgraph - p3display p3downloader p3event p3express p3gobj p3grutil p3gsgbase p3linmath - p3mathutil p3parametrics p3pgraph p3pgraphnodes p3pgui p3pipeline p3pnmimage - p3pnmtext p3pstatclient p3putil p3recorder p3text p3tform) -add_python_module(egg p3egg p3egg2pg) +# Now add the Python modules: +set(CORE_MODULE_COMPONENTS + p3chan p3char p3collide p3cull p3device p3dgraph p3display p3downloader + p3event p3express p3gobj p3grutil p3gsgbase p3linmath p3mathutil p3nativenet + p3net p3movies p3parametrics p3pgraph p3pgraphnodes p3pgui p3pipeline + p3pnmimage p3pnmtext p3pstatclient p3putil p3recorder p3text p3tform) + +if(HAVE_AUDIO) + list(APPEND CORE_MODULE_COMPONENTS p3audio) +endif() + +add_python_module(core ${CORE_MODULE_COMPONENTS}) + +if(HAVE_EGG) + add_python_module(egg p3egg p3egg2pg) +endif() diff --git a/panda/src/audio/CMakeLists.txt b/panda/src/audio/CMakeLists.txt new file mode 100644 index 0000000000..9503acc783 --- /dev/null +++ b/panda/src/audio/CMakeLists.txt @@ -0,0 +1,24 @@ +if(HAVE_AUDIO) + set(P3AUDIO_HEADERS + config_audio.h + filterProperties.h filterProperties.I + audioLoadRequest.h audioLoadRequest.I + audioManager.h audioManager.I + audioSound.h audioSound.I + nullAudioManager.h + nullAudioSound.h) + + set(P3AUDIO_SOURCES + config_audio.cxx + filterProperties.cxx + audioLoadRequest.cxx + audioManager.cxx + audioSound.cxx + nullAudioManager.cxx + nullAudioSound.cxx) + + composite_sources(p3audio P3AUDIO_SOURCES) + add_library(p3audio ${P3AUDIO_HEADERS} ${P3AUDIO_SOURCES}) + target_link_libraries(p3audio p3putil p3event p3movies p3linmath) + target_interrogate(p3audio ALL) +endif() diff --git a/panda/src/grutil/CMakeLists.txt b/panda/src/grutil/CMakeLists.txt index d7d2dd44ce..d4f2087cd3 100644 --- a/panda/src/grutil/CMakeLists.txt +++ b/panda/src/grutil/CMakeLists.txt @@ -37,5 +37,8 @@ set(P3GRUTIL_SOURCES composite_sources(p3grutil P3GRUTIL_SOURCES) add_library(p3grutil ${P3GRUTIL_SOURCES} ${P3GRUTIL_HEADERS}) -target_link_libraries(p3grutil p3display p3text) +target_link_libraries(p3grutil p3display p3text p3movies) +if(HAVE_AUDIO) + target_link_libraries(p3grutil p3audio) +endif() target_interrogate(p3grutil ALL) diff --git a/panda/src/movies/CMakeLists.txt b/panda/src/movies/CMakeLists.txt new file mode 100644 index 0000000000..4ae884c012 --- /dev/null +++ b/panda/src/movies/CMakeLists.txt @@ -0,0 +1,39 @@ +set(P3MOVIES_HEADERS + config_movies.h + inkblotVideo.h inkblotVideo.I + inkblotVideoCursor.h inkblotVideoCursor.I + microphoneAudio.h microphoneAudio.I + movieAudio.h movieAudio.I + movieAudioCursor.h movieAudioCursor.I + movieTypeRegistry.h movieTypeRegistry.I + movieVideo.h movieVideo.I + movieVideoCursor.h movieVideoCursor.I + userDataAudio.h userDataAudio.I + userDataAudioCursor.h userDataAudioCursor.I + vorbisAudio.h vorbisAudio.I + vorbisAudioCursor.h vorbisAudioCursor.I + wavAudio.h wavAudio.I + wavAudioCursor.h wavAudioCursor.I) + +set(P3MOVIES_SOURCES + config_movies.cxx + inkblotVideo.cxx + inkblotVideoCursor.cxx + microphoneAudio.cxx + microphoneAudioDS.cxx + movieAudio.cxx + movieAudioCursor.cxx + movieTypeRegistry.cxx + movieVideo.cxx + movieVideoCursor.cxx + userDataAudio.cxx + userDataAudioCursor.cxx + vorbisAudio.cxx + vorbisAudioCursor.cxx + wavAudio.cxx + wavAudioCursor.cxx) + +composite_sources(p3movies P3MOVIES_SOURCES) +add_library(p3movies ${P3MOVIES_HEADERS} ${P3MOVIES_SOURCES}) +target_link_libraries(p3movies p3pandabase p3express p3pstatclient p3gobj p3dconfig p3prc) +target_interrogate(p3movies ALL) From 1a2be0dbeee2b51f30c11516f819c9ffe26f9d13 Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Wed, 5 Feb 2014 17:09:26 -0700 Subject: [PATCH 4/8] CMake: Only attempt to build pnmtext if HAVE_FREETYPE. --- panda/CMakeLists.txt | 5 ++++- panda/src/pnmtext/CMakeLists.txt | 38 +++++++++++++++++--------------- panda/src/text/CMakeLists.txt | 5 ++++- 3 files changed, 28 insertions(+), 20 deletions(-) diff --git a/panda/CMakeLists.txt b/panda/CMakeLists.txt index 650bcaede2..cd4c40221b 100644 --- a/panda/CMakeLists.txt +++ b/panda/CMakeLists.txt @@ -69,11 +69,14 @@ set(CORE_MODULE_COMPONENTS p3chan p3char p3collide p3cull p3device p3dgraph p3display p3downloader p3event p3express p3gobj p3grutil p3gsgbase p3linmath p3mathutil p3nativenet p3net p3movies p3parametrics p3pgraph p3pgraphnodes p3pgui p3pipeline - p3pnmimage p3pnmtext p3pstatclient p3putil p3recorder p3text p3tform) + p3pnmimage p3pstatclient p3putil p3recorder p3text p3tform) if(HAVE_AUDIO) list(APPEND CORE_MODULE_COMPONENTS p3audio) endif() +if(HAVE_FREETYPE) + list(APPEND CORE_MODULE_COMPONENTS p3pnmtext) +endif() add_python_module(core ${CORE_MODULE_COMPONENTS}) diff --git a/panda/src/pnmtext/CMakeLists.txt b/panda/src/pnmtext/CMakeLists.txt index 534b9a80e3..33a332389f 100644 --- a/panda/src/pnmtext/CMakeLists.txt +++ b/panda/src/pnmtext/CMakeLists.txt @@ -1,19 +1,21 @@ -set(P3PNMTEXT_HEADERS - config_pnmtext.h - freetypeFace.h freetypeFace.I - freetypeFont.h freetypeFont.I - pnmTextGlyph.h pnmTextGlyph.I - pnmTextMaker.h pnmTextMaker.I -) -set(P3PNMTEXT_SOURCES - config_pnmtext.cxx - freetypeFace.cxx - freetypeFont.cxx - pnmTextGlyph.cxx - pnmTextMaker.cxx -) +if(HAVE_FREETYPE) + set(P3PNMTEXT_HEADERS + config_pnmtext.h + freetypeFace.h freetypeFace.I + freetypeFont.h freetypeFont.I + pnmTextGlyph.h pnmTextGlyph.I + pnmTextMaker.h pnmTextMaker.I + ) + set(P3PNMTEXT_SOURCES + config_pnmtext.cxx + freetypeFace.cxx + freetypeFont.cxx + pnmTextGlyph.cxx + pnmTextMaker.cxx + ) -composite_sources(p3pnmtext P3PNMTEXT_SOURCES) -add_library(p3pnmtext ${P3PNMTEXT_SOURCES} ${P3PNMTEXT_HEADERS}) -target_link_libraries(p3pnmtext p3pnmimage ${_FREETYPE_LIBRARIES}) -target_interrogate(p3pnmtext ALL) + composite_sources(p3pnmtext P3PNMTEXT_SOURCES) + add_library(p3pnmtext ${P3PNMTEXT_SOURCES} ${P3PNMTEXT_HEADERS}) + target_link_libraries(p3pnmtext p3pnmimage ${_FREETYPE_LIBRARIES}) + target_interrogate(p3pnmtext ALL) +endif() diff --git a/panda/src/text/CMakeLists.txt b/panda/src/text/CMakeLists.txt index 1815b6e529..1fa5fe5155 100644 --- a/panda/src/text/CMakeLists.txt +++ b/panda/src/text/CMakeLists.txt @@ -34,5 +34,8 @@ set(P3TEXT_SOURCES composite_sources(p3text P3TEXT_SOURCES) add_library(p3text ${P3TEXT_SOURCES} ${P3TEXT_HEADERS}) -target_link_libraries(p3text p3pnmtext p3parametrics ${_FREETYPE_LIBRARIES}) +target_link_libraries(p3text p3parametrics) +if(HAVE_FREETYPE) + target_link_libraries(p3text p3pnmtext ${_FREETYPE_LIBRARIES}) +endif() target_interrogate(p3text ALL) From e940c43b3e8670147e293c4d92f16acce48e3937 Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Wed, 5 Feb 2014 18:10:16 -0700 Subject: [PATCH 5/8] CMake: Remove PYTHON_LIBRARIES link from interrogatedb; it's unused there. --- dtool/src/interrogatedb/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dtool/src/interrogatedb/CMakeLists.txt b/dtool/src/interrogatedb/CMakeLists.txt index 58477d2ad7..927fea94a0 100644 --- a/dtool/src/interrogatedb/CMakeLists.txt +++ b/dtool/src/interrogatedb/CMakeLists.txt @@ -30,4 +30,4 @@ set(P3INTERROGATEDB_SOURCES composite_sources(p3interrogatedb P3INTERROGATEDB_SOURCES) add_library(p3interrogatedb ${P3INTERROGATEDB_HEADERS} ${P3INTERROGATEDB_SOURCES}) -target_link_libraries(p3interrogatedb p3dconfig ${PYTHON_LIBRARIES}) +target_link_libraries(p3interrogatedb p3dconfig) From 1ffd204b006afaca9d76ff924e7033bde8b4324b Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Wed, 5 Feb 2014 22:27:46 -0700 Subject: [PATCH 6/8] CMake: Rearrange panda/CMakeLists.txt for dependency order; older CMakes insist on it. --- panda/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/panda/CMakeLists.txt b/panda/CMakeLists.txt index cd4c40221b..a0d1673699 100644 --- a/panda/CMakeLists.txt +++ b/panda/CMakeLists.txt @@ -29,10 +29,6 @@ add_subdirectory(src/linmath) add_subdirectory(src/event) add_subdirectory(src/mathutil) add_subdirectory(src/gsgbase) -add_subdirectory(src/glstuff) -add_subdirectory(src/glgsg) -add_subdirectory(src/glxdisplay) -add_subdirectory(src/x11display) add_subdirectory(src/pnmimage) add_subdirectory(src/pnmimagetypes) add_subdirectory(src/gobj) @@ -40,6 +36,10 @@ add_subdirectory(src/pgraph) add_subdirectory(src/pgraphnodes) add_subdirectory(src/cull) add_subdirectory(src/display) +add_subdirectory(src/glstuff) +add_subdirectory(src/glgsg) +add_subdirectory(src/x11display) +add_subdirectory(src/glxdisplay) add_subdirectory(src/movies) add_subdirectory(src/audio) add_subdirectory(src/chan) From 74bc1248672a1b4bfba3d32361c805e9956789f7 Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Wed, 5 Feb 2014 23:28:28 -0700 Subject: [PATCH 7/8] CMake: Add support for building WGL display output. --- panda/CMakeLists.txt | 2 ++ panda/metalibs/pandagl/CMakeLists.txt | 5 ++++- panda/src/wgldisplay/CMakeLists.txt | 21 +++++++++++++++++++++ panda/src/windisplay/CMakeLists.txt | 17 +++++++++++++++++ 4 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 panda/src/wgldisplay/CMakeLists.txt create mode 100644 panda/src/windisplay/CMakeLists.txt diff --git a/panda/CMakeLists.txt b/panda/CMakeLists.txt index a0d1673699..3923e863c3 100644 --- a/panda/CMakeLists.txt +++ b/panda/CMakeLists.txt @@ -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) diff --git a/panda/metalibs/pandagl/CMakeLists.txt b/panda/metalibs/pandagl/CMakeLists.txt index 96eb7465cc..9ee26ce33f 100644 --- a/panda/metalibs/pandagl/CMakeLists.txt +++ b/panda/metalibs/pandagl/CMakeLists.txt @@ -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() diff --git a/panda/src/wgldisplay/CMakeLists.txt b/panda/src/wgldisplay/CMakeLists.txt new file mode 100644 index 0000000000..f6e83b06af --- /dev/null +++ b/panda/src/wgldisplay/CMakeLists.txt @@ -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() diff --git a/panda/src/windisplay/CMakeLists.txt b/panda/src/windisplay/CMakeLists.txt new file mode 100644 index 0000000000..3d07b6f9a9 --- /dev/null +++ b/panda/src/windisplay/CMakeLists.txt @@ -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() From b64feda7296b4f2074617ef92266ba4ac37c72e2 Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Wed, 5 Feb 2014 23:29:49 -0700 Subject: [PATCH 8/8] CMake: Add Windows platform libraries when building on Win32. --- panda/src/express/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/panda/src/express/CMakeLists.txt b/panda/src/express/CMakeLists.txt index 34645871ae..67f374fe0f 100644 --- a/panda/src/express/CMakeLists.txt +++ b/panda/src/express/CMakeLists.txt @@ -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() + #add_executable(p3expressTestTypes test_types.cxx) #target_link_libraries(p3expressTestTypes p3express p3dtoolutil p3dtool p3prc p3dtoolconfig p3pystub) #add_test(p3express_test_types p3expressTestTypes)