D:\OSG> git clone https://github.com/openscenegraph/OpenSceneGraph.git
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying # file Copyright.txt or https://cmake.org/licensing for details. find_program(CMAKE_MAKE_PROGRAM mingw32-make.exe PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MinGW;InstallLocation]/bin" c:/MinGW/bin /MinGW/bin "[HKEY_CURRENT_USER\\Software\\CodeBlocks;Path]/MinGW/bin" ) find_program(CMAKE_SH sh.exe ) if(CMAKE_SH) message(FATAL_ERROR "sh.exe was found in your PATH, here:\n${CMAKE_SH}\nFor MinGW make to work correctly sh.exe must NOT be in your path.\nRun cmake from a shell that does not have sh.exe in your PATH.\nIf you want to use a UNIX shell, then use MSYS Makefiles.\n") set(CMAKE_MAKE_PROGRAM NOTFOUND) endif() mark_as_advanced(CMAKE_MAKE_PROGRAM CMAKE_SH)
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying # file Copyright.txt or https://cmake.org/licensing for details. find_program(CMAKE_MAKE_PROGRAM mingw32-make.exe PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MinGW;InstallLocation]/bin" c:/MinGW/bin /MinGW/bin "[HKEY_CURRENT_USER\\Software\\CodeBlocks;Path]/MinGW/bin" ) #find_program(CMAKE_SH sh.exe ) #if(CMAKE_SH) # message(FATAL_ERROR "sh.exe was found in your PATH, here:\n${CMAKE_SH}\nFor MinGW make to work correctly sh.exe must NOT be in your path.\nRun cmake from a shell that does not have sh.exe in your PATH.\nIf you want to use a UNIX shell, then use MSYS Makefiles.\n") # set(CMAKE_MAKE_PROGRAM NOTFOUND) #endif() mark_as_advanced(CMAKE_MAKE_PROGRAM CMAKE_SH)
C:\Qt\Qt5.11.2\5.11.2\mingw53_32>D: D:\> cd OSG\build-win32-debug
D:\OSG\build-win32-debug>cmake -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=E:\Apps\OSG -DCMAKE_BUILD_TYPE=DEBUG ../OpenSceneGraph
-- The C compiler identification is GNU 5.3.0 -- The CXX compiler identification is GNU 5.3.0 -- Check for working C compiler: C:/Qt/Qt5.11.2/Tools/mingw530_32/bin/gcc.exe -- Check for working C compiler: C:/Qt/Qt5.11.2/Tools/mingw530_32/bin/gcc.exe -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: C:/Qt/Qt5.11.2/Tools/mingw530_32/bin/g++.exe -- Check for working CXX compiler: C:/Qt/Qt5.11.2/Tools/mingw530_32/bin/g++.exe -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for pthread.h -- Looking for pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - found -- Found Threads: TRUE -- Found OpenGL: opengl32 -- Could NOT find EGL (missing: EGL_INCLUDE_DIR) -- Checking windows version... -- Performing Test GL_HEADER_HAS_GLINT64 -- Performing Test GL_HEADER_HAS_GLINT64 - Failed -- Performing Test GL_HEADER_HAS_GLUINT64 -- Performing Test GL_HEADER_HAS_GLUINT64 - Failed -- 32 bit architecture detected -- Could NOT find Freetype (missing: FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS) -- Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR) -- Could NOT find Jasper (missing: JASPER_LIBRARIES JASPER_INCLUDE_DIR JPEG_LIBRARIES) -- Could NOT find LibXml2 (missing: LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR) -- Could NOT find ZLIB (missing: ZLIB_INCLUDE_DIR) -- Could NOT find ZLIB (missing: ZLIB_INCLUDE_DIR) -- Could NOT find GDAL (missing: GDAL_LIBRARY GDAL_INCLUDE_DIR) -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR) -- Trying to find DCMTK expecting DCMTKConfig.cmake -- Trying to find DCMTK expecting DCMTKConfig.cmake - failed -- Trying to find DCMTK relying on FindDCMTK.cmake -- Please set DCMTK_DIR and re-run configure (missing: DCMTK_config_INCLUDE_DIR DCMTK_dcmdata_INCLUDE_DIR DCMTK_dcmimage_INCLUDE_DIR DCMTK_dcmimgle_INCLUDE_DIR DCMTK_dcmjpeg_INCLUDE_DIR DCMTK_dcmjpls_INCLUDE_DIR DCMTK_dcmnet_INCLUDE_DIR DCMTK_dcmpstat_INCLUDE_DIR DCMTK_dcmqrdb_INCLUDE_DIR DCMTK_dcmsign_INCLUDE_DIR DCMTK_dcmsr_INCLUDE_DIR DCMTK_dcmtls_INCLUDE_DIR DCMTK_ofstd_INCLUDE_DIR DCMTK_oflog_INCLUDE_DIR) -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Could NOT find GStreamer (missing: GSTREAMER_INCLUDE_DIRS GSTREAMER_LIBRARIES GSTREAMER_VERSION GSTREAMER_BASE_INCLUDE_DIRS GSTREAMER_BASE_LIBRARIES GSTREAMER_APP_INCLUDE_DIRS GSTREAMER_APP_LIBRARIES GSTREAMER_PBUTILS_INCLUDE_DIRS GSTREAMER_PBUTILS_LIBRARIES) (found version "") -- Could NOT find SDL2 (missing: SDL2_LIBRARY SDL2_INCLUDE_DIR) -- Could NOT find SDL (missing: SDL_LIBRARY SDL_INCLUDE_DIR) -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR) -- Could NOT find ZLIB (missing: ZLIB_INCLUDE_DIR) -- Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR) -- Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR) -- g++ version 5.3.0 -- Performing Test _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS -- Performing Test _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS - Success -- Performing Test _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS -- Performing Test _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS - Failed -- Performing Test _OPENTHREADS_ATOMIC_USE_SUN -- Performing Test _OPENTHREADS_ATOMIC_USE_SUN - Failed -- Performing Test _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED -- Performing Test _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED - Success -- Performing Test _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC -- Performing Test _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC - Failed -- Configuring done -- Generating done -- Build files have been written to: D:/OSG/build-win32-debug
configure (missing: DCMTK_config_INCLUDE_DIR DCMTK_dcmdata_INCLUDE_DIR DCMTK_dcmimage_INCLUDE_DIR DCMTK_dcmimgle_INCLUDE_DIR DCMTK_dcmjpeg_INCLUDE_DIR DCMTK_dcmjpls_INCLUDE_DIR DCMTK_dcmnet_INCLUDE_DIR DCMTK_dcmpstat_INCLUDE_DIR DCMTK_dcmqrdb_INCLUDE_DIR DCMTK_dcmsign_INCLUDE_DIR DCMTK_dcmsr_INCLUDE_DIR DCMTK_dcmtls_INCLUDE_DIR DCMTK_ofstd_INCLUDE_DIR DCMTK_oflog_INCLUDE_DIR) -- The C compiler identification is GNU 5.3.0 -- The CXX compiler identification is GNU 5.3.0 -- Check for working C compiler: C:/Qt/Qt5.11.2/Tools/mingw530_32/bin/gcc.exe -- Check for working C compiler: C:/Qt/Qt5.11.2/Tools/mingw530_32/bin/gcc.exe -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: C:/Qt/Qt5.11.2/Tools/mingw530_32/bin/g++.exe -- Check for working CXX compiler: C:/Qt/Qt5.11.2/Tools/mingw530_32/bin/g++.exe -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for pthread.h -- Looking for pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - found -- Found Threads: TRUE -- Found OpenGL: opengl32 -- Could NOT find EGL (missing: EGL_INCLUDE_DIR) -- Checking windows version... -- Performing Test GL_HEADER_HAS_GLINT64 -- Performing Test GL_HEADER_HAS_GLINT64 - Failed -- Performing Test GL_HEADER_HAS_GLUINT64 -- Performing Test GL_HEADER_HAS_GLUINT64 - Failed -- 32 bit architecture detected -- Could NOT find Freetype (missing: FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS) -- Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR) -- Could NOT find Jasper (missing: JASPER_LIBRARIES JASPER_INCLUDE_DIR JPEG_LIBRARIES) -- Could NOT find LibXml2 (missing: LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR) -- Could NOT find ZLIB (missing: ZLIB_INCLUDE_DIR) -- Could NOT find ZLIB (missing: ZLIB_INCLUDE_DIR) -- Could NOT find GDAL (missing: GDAL_LIBRARY GDAL_INCLUDE_DIR) -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR) -- Trying to find DCMTK expecting DCMTKConfig.cmake -- Trying to find DCMTK expecting DCMTKConfig.cmake - failed -- Trying to find DCMTK relying on FindDCMTK.cmake -- Please set DCMTK_DIR and re-run configure (missing: DCMTK_config_INCLUDE_DIR DCMTK_dcmdata_INCLUDE_DIR DCMTK_dcmimage_INCLUDE_DIR DCMTK_dcmimgle_INCLUDE_DIR DCMTK_dcmjpeg_INCLUDE_DIR DCMTK_dcmjpls_INCLUDE_DIR DCMTK_dcmnet_INCLUDE_DIR DCMTK_dcmpstat_INCLUDE_DIR DCMTK_dcmqrdb_INCLUDE_DIR DCMTK_dcmsign_INCLUDE_DIR DCMTK_dcmsr_INCLUDE_DIR DCMTK_dcmtls_INCLUDE_DIR DCMTK_ofstd_INCLUDE_DIR DCMTK_oflog_INCLUDE_DIR) -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Could NOT find GStreamer (missing: GSTREAMER_INCLUDE_DIRS GSTREAMER_LIBRARIES GSTREAMER_VERSION GSTREAMER_BASE_INCLUDE_DIRS GSTREAMER_BASE_LIBRARIES GSTREAMER_APP_INCLUDE_DIRS GSTREAMER_APP_LIBRARIES GSTREAMER_PBUTILS_INCLUDE_DIRS GSTREAMER_PBUTILS_LIBRARIES) (found version "") -- Could NOT find SDL2 (missing: SDL2_LIBRARY SDL2_INCLUDE_DIR) -- Could NOT find SDL (missing: SDL_LIBRARY SDL_INCLUDE_DIR) -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR) -- Could NOT find ZLIB (missing: ZLIB_INCLUDE_DIR) -- Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR) -- Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR) -- g++ version 5.3.0 -- Performing Test _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS -- Performing Test _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS - Success -- Performing Test _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS -- Performing Test _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS - Failed -- Performing Test _OPENTHREADS_ATOMIC_USE_SUN -- Performing Test _OPENTHREADS_ATOMIC_USE_SUN - Failed -- Performing Test _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED -- Performing Test _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED - Success -- Performing Test _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC -- Performing Test _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC - Failed -- Configuring done -- Generating done -- Build files have been written to: D:/OSG/build-win32-debug
GSTREAMER_INCLUDE_DIRS GSTREAMER_LIBRARIES GSTREAMER_VERSION GSTREAMER_BASE_INCLUDE_DIRS GSTREAMER_BASE_LIBRARIES GSTREAMER_APP_INCLUDE_DIRS GSTREAMER_APP_LIBRARIES GSTREAMER_PBUTILS_INCLUDE_DIRS GSTREAMER_PBUTILS_LIBRARIES) (found version "") -- The C compiler identification is GNU 5.3.0 -- The CXX compiler identification is GNU 5.3.0 -- Check for working C compiler: C:/Qt/Qt5.11.2/Tools/mingw530_32/bin/gcc.exe -- Check for working C compiler: C:/Qt/Qt5.11.2/Tools/mingw530_32/bin/gcc.exe -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: C:/Qt/Qt5.11.2/Tools/mingw530_32/bin/g++.exe -- Check for working CXX compiler: C:/Qt/Qt5.11.2/Tools/mingw530_32/bin/g++.exe -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for pthread.h -- Looking for pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - found -- Found Threads: TRUE -- Found OpenGL: opengl32 -- Could NOT find EGL (missing: EGL_INCLUDE_DIR) -- Checking windows version... -- Performing Test GL_HEADER_HAS_GLINT64 -- Performing Test GL_HEADER_HAS_GLINT64 - Failed -- Performing Test GL_HEADER_HAS_GLUINT64 -- Performing Test GL_HEADER_HAS_GLUINT64 - Failed -- 32 bit architecture detected -- Could NOT find Freetype (missing: FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS) -- Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR) -- Could NOT find Jasper (missing: JASPER_LIBRARIES JASPER_INCLUDE_DIR JPEG_LIBRARIES) -- Could NOT find LibXml2 (missing: LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR) -- Could NOT find ZLIB (missing: ZLIB_INCLUDE_DIR) -- Could NOT find ZLIB (missing: ZLIB_INCLUDE_DIR) -- Could NOT find GDAL (missing: GDAL_LIBRARY GDAL_INCLUDE_DIR) -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR) -- Trying to find DCMTK expecting DCMTKConfig.cmake -- Trying to find DCMTK expecting DCMTKConfig.cmake - failed -- Trying to find DCMTK relying on FindDCMTK.cmake -- Please set DCMTK_DIR and re-run configure (missing: DCMTK_config_INCLUDE_DIR DCMTK_dcmdata_INCLUDE_DIR DCMTK_dcmimage_INCLUDE_DIR DCMTK_dcmimgle_INCLUDE_DIR DCMTK_dcmjpeg_INCLUDE_DIR DCMTK_dcmjpls_INCLUDE_DIR DCMTK_dcmnet_INCLUDE_DIR DCMTK_dcmpstat_INCLUDE_DIR DCMTK_dcmqrdb_INCLUDE_DIR DCMTK_dcmsign_INCLUDE_DIR DCMTK_dcmsr_INCLUDE_DIR DCMTK_dcmtls_INCLUDE_DIR DCMTK_ofstd_INCLUDE_DIR DCMTK_oflog_INCLUDE_DIR) -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Could NOT find GStreamer (missing: GSTREAMER_INCLUDE_DIRS GSTREAMER_LIBRARIES GSTREAMER_VERSION GSTREAMER_BASE_INCLUDE_DIRS GSTREAMER_BASE_LIBRARIES GSTREAMER_APP_INCLUDE_DIRS GSTREAMER_APP_LIBRARIES GSTREAMER_PBUTILS_INCLUDE_DIRS GSTREAMER_PBUTILS_LIBRARIES) (found version "") -- Could NOT find SDL2 (missing: SDL2_LIBRARY SDL2_INCLUDE_DIR) -- Could NOT find SDL (missing: SDL_LIBRARY SDL_INCLUDE_DIR) -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR) -- Could NOT find ZLIB (missing: ZLIB_INCLUDE_DIR) -- Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR) -- Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR) -- g++ version 5.3.0 -- Performing Test _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS -- Performing Test _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS - Success -- Performing Test _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS -- Performing Test _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS - Failed -- Performing Test _OPENTHREADS_ATOMIC_USE_SUN -- Performing Test _OPENTHREADS_ATOMIC_USE_SUN - Failed -- Performing Test _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED -- Performing Test _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED - Success -- Performing Test _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC -- Performing Test _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC - Failed -- Configuring done -- Generating done -- Build files have been written to: D:/OSG/build-win32-debug
D:\OSG\build-win32-debug>mingw32-make -j9
D:\OSG\build-win32-debug> mingw32-make install
D:\OSG\build-win32-debug>cd .. D:\OSG> mkdir build-win32-release D:\OSG>cd build-win32-release D:\OSG\build-win32-release> cmake -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=E:\Apps\OSG ../OpenSceneGraph D:\OSG\build-win32-release> mingw32-make -j9 D:\OSG\build-win32-release> mingw32-make install
OSG-lessons/ |-data/ |-OSG-lessons/ | |-hello/ |-include/ |-src/
TEMPLATE = app TARGET = hello DESTDIR = ../../bin win32 { OSG_LIB_DIRECTORY = $$(OSG_BIN_PATH) OSG_INCLUDE_DIRECTORY = $$(OSG_INCLUDE_PATH) CONFIG(debug, debug|release) { TARGET = $$join(TARGET,,,_d) LIBS += -L$$OSG_LIB_DIRECTORY -losgd LIBS += -L$$OSG_LIB_DIRECTORY -losgViewerd LIBS += -L$$OSG_LIB_DIRECTORY -losgDBd LIBS += -L$$OSG_LIB_DIRECTORY -lOpenThreadsd } else { LIBS += -L$$OSG_LIB_DIRECTORY -losg LIBS += -L$$OSG_LIB_DIRECTORY -losgViewer LIBS += -L$$OSG_LIB_DIRECTORY -losgDB LIBS += -L$$OSG_LIB_DIRECTORY -lOpenThreads } INCLUDEPATH += $$OSG_INCLUDE_DIRECTORY } unix { CONFIG(debug, debug|release) { TARGET = $$join(TARGET,,,_d) LIBS += -losgd LIBS += -losgViewerd LIBS += -losgDBd LIBS += -lOpenThreadsd } else { LIBS += -losg LIBS += -losgViewer LIBS += -losgDB LIBS += -lOpenThreads } } INCLUDEPATH += ./include HEADERS += $$files(./include/*.h) SOURCES += $$files(./src/*.cpp)
TEMPLATE = app TARGET = hello DESTDIR = ../../bin
win32 { OSG_LIB_DIRECTORY = $$(OSG_BIN_PATH) OSG_INCLUDE_DIRECTORY = $$(OSG_INCLUDE_PATH) CONFIG(debug, debug|release) { TARGET = $$join(TARGET,,,_d) LIBS += -L$$OSG_LIB_DIRECTORY -losgd LIBS += -L$$OSG_LIB_DIRECTORY -losgViewerd LIBS += -L$$OSG_LIB_DIRECTORY -losgDBd LIBS += -L$$OSG_LIB_DIRECTORY -lOpenThreadsd } else { LIBS += -L$$OSG_LIB_DIRECTORY -losg LIBS += -L$$OSG_LIB_DIRECTORY -losgViewer LIBS += -L$$OSG_LIB_DIRECTORY -losgDB LIBS += -L$$OSG_LIB_DIRECTORY -lOpenThreads } INCLUDEPATH += $$OSG_INCLUDE_DIRECTORY }
CONFIG(debug, debug|release) { TARGET = $$join(TARGET,,,_d) LIBS += -L$$OSG_LIB_DIRECTORY -losgd LIBS += -L$$OSG_LIB_DIRECTORY -losgViewerd LIBS += -L$$OSG_LIB_DIRECTORY -losgDBd LIBS += -L$$OSG_LIB_DIRECTORY -lOpenThreadsd } else { LIBS += -L$$OSG_LIB_DIRECTORY -losg LIBS += -L$$OSG_LIB_DIRECTORY -losgViewer LIBS += -L$$OSG_LIB_DIRECTORY -losgDB LIBS += -L$$OSG_LIB_DIRECTORY -lOpenThreads }
unix { CONFIG(debug, debug|release) { TARGET = $$join(TARGET,,,_d) LIBS += -losgd LIBS += -losgViewerd LIBS += -losgDBd LIBS += -lOpenThreadsd } else { LIBS += -losg LIBS += -losgViewer LIBS += -losgDB LIBS += -lOpenThreads } }
INCLUDEPATH += $$OSG_INCLUDE_DIRECTORY INCLUDEPATH += ./include HEADERS += $$files(./include/*.h) SOURCES += $$files(./src/*.cpp)
#ifndef MAIN_H #define MAIN_H #include <osgDB/ReadFile> #include <osgViewer/Viewer> #endif
#include "main.h" int main(int argc, char *argv[]) { (void) argc; (void) argv; osg::ref_ptr<osg::Node> root = osgDB::readNodeFile("../data/cessna.osg"); osgViewer::Viewer viewer; viewer.setSceneData(root.get()); return viewer.run(); }
(void) argc; (void) argv;
osg::ref_ptr<osg::Node> root = osgDB::readNodeFile("../data/cessna.osg");
viewer.setSceneData(root.get());
return viewer.run();
Source: https://habr.com/ru/post/429816/
All Articles