markaren / threepp

C++20 port of three.js (r129)
MIT License
625 stars 59 forks source link

Any one can build this project under msys2/mingw64 gcc #201

Closed asmwarrior closed 9 months ago

asmwarrior commented 9 months ago

This project is good!

I'm wondering if any one has build this project under msys2, under the mingw64/gcc, thanks.

I'm not sure the build system, is it possible to use the CMake build system? Thanks.

markaren commented 9 months ago

I know this project compiles under MSVC 2019, 2022, gcc(linux), clang(mingw), apple-clang, clang (emscripten). It should also work with Windows Subsystem For Linux (WSL) at least when targeting Emscripten(not testet). I don't have direct experience with msys2, but should be similar to MinGW? Anyhow, the only issue I can forsee is vcpkg, and this project does not HAVE to use vcpkg, but you would have to supply glfw3 and glad libraries yourself (and perhaps do tiny changes in CMake).

asmwarrior commented 9 months ago

I know this project compiles under MSVC 2019, 2022, gcc(linux), clang(mingw), apple-clang, clang (emscripten). It should also work with Windows Subsystem For Linux (WSL) at least when targeting Emscripten(not testet). I don't have direct experience with msys2, but should be similar to MinGW?

msys2 is much similar like gcc(linux), it has a shell(mitty), from my point of view, works similar like the bash.

Anyhow, the only issue I can forsee is vcpkg, and this project does not HAVE to use vcpkg, but you would have to supply glfw3 and glad libraries yourself (and perhaps do tiny changes in CMake).

Msys2 has many pre-build packages include stb, nlohmann_json, glfw3 and many gl function loading library such as glew. So most libraries are already there.

I think some cmake export can make this library build under msys2 quickly.

asmwarrior commented 9 months ago
@@ -30,9 +30,9 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
 find_package(stb CONFIG QUIET)
 find_package(nlohmann_json CONFIG REQUIRED)

-if (NOT stb_INCLUDE_DIR)
-    find_path(stb_INCLUDE_DIR "stb_c_lexer.h" REQUIRED)
-endif ()
+# if (NOT stb_INCLUDE_DIR)
+    # find_path(stb_INCLUDE_DIR "stb_c_lexer.h" REQUIRED)
+# endif ()

 if (DEFINED EMSCRIPTEN)
     if ("${CMAKE_SYSTEM}" MATCHES "Linux" OR "${CMAKE_SYSTEM}" MATCHES "Darwin-*")

I try to comment out the lines to detect the stb library, in-fact, I have the stb package installed in msys2/mingw64 already.

Now, I got an error:

# cmake .. -DTHREEPP_BUILD_EXAMPLES=OFF -DTHREEPP_BUILD_EXAMPLE_PROJECTS=OFF -DTHREEPP_BUILD_TESTS=OFF -DBUILD_SHARED_LIBS=ON -G "MinGW Makefiles"
-- The C compiler identification is GNU 13.2.0
-- The CXX compiler identification is GNU 13.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: F:/msys2/mingw64/bin/cc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: F:/msys2/mingw64/bin/c++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Current threepp version: 129.1.0

-- Found nlohmann_json: F:/msys2/mingw64/share/cmake/nlohmann_json/nlohmann_jsonConfig.cmake (found version "3.11.3")
CMake Error at CMakeLists.txt:43 (find_package):
  Could not find a package configuration file provided by "glad" with any of
  the following names:

    gladConfig.cmake
    glad-config.cmake

  Add the installation prefix of "glad" to CMAKE_PREFIX_PATH or set
  "glad_DIR" to a directory containing one of the above files.  If "glad"
  provides a separate development package or SDK, be sure it has been
  installed.

-- Configuring incomplete, errors occurred!

I have already download a glad.zip file from the glad website (https://glad.dav1d.de/), and I made a sub folder named glad, and I create a simple cmake file below:

cmake_minimum_required(VERSION 3.19)
project(glad)

add_library(glad include/glad/glad.h src/glad.c)
target_include_directories(glad PUBLIC include/)

Now, I can build this target under msys2, the result is:

I have a file named libglad.a, in the folder F:\code\threepp\glad\build

Now, the remaining issue is that I need to let the threepp to find the glad library. Not sure how to do it, because I'm not familiar with cmake.

markaren commented 9 months ago

Try:

cmake . -B build -DCMAKE_PREFIX_PATH="/path/to/glad/installation/dir" -DCMAKE_BUILD_TYPE="Release"
cmake --build build

By the way, the dev branch now ships with stb included.

asmwarrior commented 9 months ago

Try:

cmake . -B build -DCMAKE_PREFIX_PATH="/path/to/glad/installation/dir" -DCMAKE_BUILD_TYPE="Release"
cmake --build build

By the way, the dev branch now ships with stb included.

Thanks for the help. But for me, I see that the glad has no "install" target in the generated makefile, so when I run the "mingw32-make.exe install", it just failed that it can't find the "install" target.

I'm not sure how cmake try to detect the glad library, can I use the build directory path?

Here is the file structure of the <threepp_root>/glad/

# tree
.
├── build
│   ├── cmake_install.cmake
│   ├── CMakeCache.txt
│   ├── CMakeFiles
│   │   ├── 3.28.1
│   │   │   ├── CMakeCCompiler.cmake
│   │   │   ├── CMakeCXXCompiler.cmake
│   │   │   ├── CMakeDetermineCompilerABI_C.bin
│   │   │   ├── CMakeDetermineCompilerABI_CXX.bin
│   │   │   ├── CMakeRCCompiler.cmake
│   │   │   ├── CMakeSystem.cmake
│   │   │   ├── CompilerIdC
│   │   │   │   ├── a.exe
│   │   │   │   ├── CMakeCCompilerId.c
│   │   │   │   └── tmp
│   │   │   └── CompilerIdCXX
│   │   │       ├── a.exe
│   │   │       ├── CMakeCXXCompilerId.cpp
│   │   │       └── tmp
│   │   ├── cmake.check_cache
│   │   ├── CMakeConfigureLog.yaml
│   │   ├── CMakeDirectoryInformation.cmake
│   │   ├── CMakeScratch
│   │   ├── glad.dir
│   │   │   ├── build.make
│   │   │   ├── cmake_clean.cmake
│   │   │   ├── cmake_clean_target.cmake
│   │   │   ├── compiler_depend.make
│   │   │   ├── compiler_depend.ts
│   │   │   ├── depend.make
│   │   │   ├── DependInfo.cmake
│   │   │   ├── flags.make
│   │   │   ├── includes_C.rsp
│   │   │   ├── link.txt
│   │   │   ├── progress.make
│   │   │   └── src
│   │   │       ├── glad.c.obj
│   │   │       └── glad.c.obj.d
│   │   ├── Makefile.cmake
│   │   ├── Makefile2
│   │   ├── pkgRedirects
│   │   ├── progress.marks
│   │   └── TargetDirectories.txt
│   ├── libglad.a
│   └── Makefile
├── CMakeLists.txt
├── include
│   ├── glad
│   │   └── glad.h
│   └── KHR
│       └── khrplatform.h
└── src
    └── glad.c

16 directories, 38 files

Thanks.

markaren commented 9 months ago

Are you sure you can't use vcpkg?

Anyhow, if you really, really just want it to work, you could (probably) include and compile glad as part of threepp:

1, Remove find_package(glad CONFIG REQUIRED) in CMakeLists.txt

  1. Add glad/glad.h in /include
  2. Add glad.c into src/ and place "glad.c" under the "sources" variable in src/CMakeLists.txt

Dirty, but should get the work done.

Also note that the Emscripten toolchain requires neither glad nor glfw3 when building threpp.

asmwarrior commented 9 months ago

Are you sure you can't use vcpkg?

Anyhow, if you really, really just want it to work, you could (probably) include and compile glad as part of threepp:

1, Remove find_package(glad CONFIG REQUIRED) in CMakeLists.txt 2. Add glad/glad.h in /include 3. Add glad.c into src/ and place "glad.c" under the "sources" variable in src/CMakeLists.txt

Dirty, but should get the work done.

Also note that the Emscripten toolchain requires neither glad nor glfw3 when building threpp.

Hi, thanks, follow the steps, I can run the mingw32-make.exe now, but I got an build error:

In file included from F:/code/threepp/src/threepp/renderers/gl/GLBindingStates.hpp:7,
                 from F:\code\threepp\src\threepp\renderers\GLRenderer.cpp:8:
F:/code/threepp/src/threepp/renderers/gl/GLCapabilities.hpp: In constructor 'threepp::gl::GLCapabilities::GLCapabilities()':
F:/code/threepp/src/threepp/renderers/gl/GLCapabilities.hpp:66:62: error: 'GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT' was not declared in this scope
   66 |             : maxAnisotropy(static_cast<int>(glGetParameterf(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT))),
      |                                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
F:/code/threepp/src/threepp/renderers/gl/GLCapabilities.hpp:74:49: error: 'GL_MAX_VERTEX_UNIFORM_VECTORS' was not declared in this scope; did you mean 'GL_MAX_VERTEX_UNIFORM_BLOCKS'?
   74 |               maxVertexUniforms(glGetParameteri(GL_MAX_VERTEX_UNIFORM_VECTORS)),
      |                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                 GL_MAX_VERTEX_UNIFORM_BLOCKS
F:/code/threepp/src/threepp/renderers/gl/GLCapabilities.hpp:75:43: error: 'GL_MAX_VARYING_VECTORS' was not declared in this scope; did you mean 'GL_MAX_VARYING_FLOATS'?
   75 |               maxVaryings(glGetParameteri(GL_MAX_VARYING_VECTORS)),
      |                                           ^~~~~~~~~~~~~~~~~~~~~~
      |                                           GL_MAX_VARYING_FLOATS
F:/code/threepp/src/threepp/renderers/gl/GLCapabilities.hpp:76:51: error: 'GL_MAX_FRAGMENT_UNIFORM_VECTORS' was not declared in this scope; did you mean 'GL_MAX_FRAGMENT_UNIFORM_BLOCKS'?
   76 |               maxFragmentUniforms(glGetParameteri(GL_MAX_FRAGMENT_UNIFORM_VECTORS)),
      |                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                   GL_MAX_FRAGMENT_UNIFORM_BLOCKS
F:/code/threepp/src/threepp/renderers/gl/GLCapabilities.hpp:79:37: error: 'GL_ARB_texture_float' was not declared in this scope
   79 |               floatFragmentTextures(GL_ARB_texture_float),
      |                                     ^~~~~~~~~~~~~~~~~~~~
mingw32-make[2]: *** [src\CMakeFiles\threepp.dir\build.make:2101: src/CMakeFiles/threepp.dir/threepp/renderers/GLRenderer.cpp.obj] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:97: src/CMakeFiles/threepp.dir/all] Error 2
mingw32-make: *** [Makefile:135: all] Error 2

It looks like my glad source code is a bit low. (from the site: https://glad.dav1d.de/), I only selected the opengl 3.3 version, and I do not select any extension. Maybe, I need to select a high level version of opengl? What is the minimal opengl version do I need?

asmwarrior commented 9 months ago

I tried many times to select different opengl version levels and other different extensions to fix the build error. I think you need to add some description in the home page about the necessary opengl extension or levels needed to build this library. Thanks.

EDIT: this is the option I used for generation. I just found it from the beginning of the glad.c file.

/*

    GLSC2, OpenGL, OpenGL ES loader generated by glad 0.1.36 on Sun Jan 28 08:20:48 2024.

    Language/Generator: C/C++
    Specification: gl
    APIs: gl=4.1, gles1=1.0, gles2=2.0, glsc2=2.0
    Profile: compatibility
    Extensions:
        GL_ARB_texture_filter_anisotropic,
        GL_ARB_texture_float,
        GL_EXT_texture_filter_anisotropic
    Loader: True
    Local files: False
    Omit khrplatform: False
    Reproducible: False

    Commandline:
        --profile="compatibility" --api="gl=4.1,gles1=1.0,gles2=2.0,glsc2=2.0" --generator="c" --spec="gl" --extensions="GL_ARB_texture_filter_anisotropic,GL_ARB_texture_float,GL_EXT_texture_filter_anisotropic"
    Online:
        https://glad.dav1d.de/#profile=compatibility&language=c&specification=gl&loader=on&api=gl%3D4.1&api=gles1%3D1.0&api=gles2%3D2.0&api=glsc2%3D2.0&extensions=GL_ARB_texture_filter_anisotropic&extensions=GL_ARB_texture_float&extensions=GL_EXT_texture_filter_anisotropic
*/
asmwarrior commented 9 months ago

I have successfully built the libthreepp.dll. Another question is how can I build a minimal example? I mean is there a simple example code that I can use this library and show something in a simple glfw window? I don't want to use the imgui framework, thanks.

markaren commented 9 months ago

I think you need to add some description in the home page about the necessary opengl extension or levels needed to build this library. Thanks.

GL 4.1 (or even lower?) and extension ARB_texture_floats should suffice.

I mean is there a simple example code that I can use this library and show something in a simple glfw window?

You had -DTHREEPP_BUILD_EXAMPLES=OFF in an earlier example. Make sure it is ON. Then it should build the examples. It won't build examples that require additional dependencies if CMake can't find them.

asmwarrior commented 9 months ago

I think you need to add some description in the home page about the necessary opengl extension or levels needed to build this library. Thanks.

GL 4.1 (or even lower?) and extension ARB_texture_floats should suffice.

Thanks for the info. I have just posted my configuration in this comment, see here: https://github.com/markaren/threepp/issues/201#issuecomment-1913513321

I mean is there a simple example code that I can use this library and show something in a simple glfw window?

You had -DTHREEPP_BUILD_EXAMPLES=OFF in an earlier example. Make sure it is ON. Then it should build the examples. It won't build examples that require additional dependencies if CMake can't find them.

OK, let me try it. I see there is an macro option HAS_IMGUI, but I don't see this option is defined or checked in any file. So, by default, this option is OFF?

markaren commented 9 months ago

HAS_IMGUI is only defined if threepp's CMake configuration in /examples/LibConfig.cmake finds imgui.

If you copy this code into your own project you would remove one of the code paths.

asmwarrior commented 9 months ago

OK, I think I have done, and here is the screen shot when I run the demo.exe inside the build\bin folder.

image

markaren commented 9 months ago

Great. I might just include glad with the repo in the future.

asmwarrior commented 9 months ago

Great. I might just include glad with the repo in the future.

https://github.com/asmwarrior/threepp/commits/master/

You can see my commits in my fork, I have add my changes to build threepp inside the msys2 inside the mingw64 platform.

Here is the build command and log I use:

Inside the "build" folder, I run this:

# cmake .. -DTHREEPP_BUILD_EXAMPLES=ON -DTHREEPP_BUILD_EXAMPLE_PROJECTS=OFF -DTHREEPP_BUILD_TESTS=OFF -DBUILD_SHARED_LIBS=ON -G "MinGW Makefiles"
-- The C compiler identification is GNU 13.2.0
-- The CXX compiler identification is GNU 13.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: F:/msys2/mingw64/bin/cc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: F:/msys2/mingw64/bin/c++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Current threepp version: 129.1.0

-- Found nlohmann_json: F:/msys2/mingw64/share/cmake/nlohmann_json/nlohmann_jsonConfig.cmake (found version "3.11.3")
-- Could NOT find imgui (missing: imgui_DIR)
CMake Warning (dev) at examples/AddExample.cmake:15 (message):
  imgui not found, skipping 'audio' example..
Call Stack (most recent call first):
  examples/audio/CMakeLists.txt:2 (add_example)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at examples/AddExample.cmake:15 (message):
  imgui not found, skipping 'box_geometry' example..
Call Stack (most recent call first):
  examples/geometries/CMakeLists.txt:10 (add_example)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at examples/AddExample.cmake:15 (message):
  imgui not found, skipping 'cylinder_geometry' example..
Call Stack (most recent call first):
  examples/geometries/CMakeLists.txt:11 (add_example)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at examples/AddExample.cmake:15 (message):
  imgui not found, skipping 'plane_geometry' example..
Call Stack (most recent call first):
  examples/geometries/CMakeLists.txt:12 (add_example)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at examples/AddExample.cmake:15 (message):
  imgui not found, skipping 'sphere_geometry' example..
Call Stack (most recent call first):
  examples/geometries/CMakeLists.txt:13 (add_example)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at examples/AddExample.cmake:15 (message):
  imgui not found, skipping 'clipping' example..
Call Stack (most recent call first):
  examples/misc/CMakeLists.txt:4 (add_example)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at examples/AddExample.cmake:15 (message):
  imgui not found, skipping 'morphtargets' example..
Call Stack (most recent call first):
  examples/misc/CMakeLists.txt:5 (add_example)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at examples/AddExample.cmake:15 (message):
  imgui not found, skipping 'bones' example..
Call Stack (most recent call first):
  examples/objects/CMakeLists.txt:15 (add_example)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at examples/AddExample.cmake:15 (message):
  imgui not found, skipping 'decal' example..
Call Stack (most recent call first):
  examples/objects/CMakeLists.txt:16 (add_example)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at examples/AddExample.cmake:15 (message):
  imgui not found, skipping 'imgui_framebuffer' example..
Call Stack (most recent call first):
  examples/textures/CMakeLists.txt:12 (add_example)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at examples/projects/CMakeLists.txt:12 (message):
  Building examples, but NOT example projects.  Re-run with
  -DTHREEPP_BUILD_EXAMPLE_PROJECTS=ON to change this behaviour.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring done (3.6s)
-- Generating done (1.2s)
-- Build files have been written to: F:/code/threepp/build

Then, I just build the project by the command:

# mingw32-make
[  0%] Building C object src/CMakeFiles/threepp.dir/threepp/glad.c.obj
[  1%] Building CXX object src/CMakeFiles/threepp.dir/threepp/canvas/Canvas.cpp.obj
[  1%] Building CXX object src/CMakeFiles/threepp.dir/threepp/cameras/Camera.cpp.obj
[  2%] Building CXX object src/CMakeFiles/threepp.dir/threepp/cameras/PerspectiveCamera.cpp.obj
[  2%] Building CXX object src/CMakeFiles/threepp.dir/threepp/cameras/OrthographicCamera.cpp.obj
[  3%] Building CXX object src/CMakeFiles/threepp.dir/threepp/controls/FlyControls.cpp.obj
[  3%] Building CXX object src/CMakeFiles/threepp.dir/threepp/controls/OrbitControls.cpp.obj
[  3%] Building CXX object src/CMakeFiles/threepp.dir/threepp/core/BufferGeometry.cpp.obj
[  4%] Building CXX object src/CMakeFiles/threepp.dir/threepp/core/Clock.cpp.obj
[  4%] Building CXX object src/CMakeFiles/threepp.dir/threepp/core/EventDispatcher.cpp.obj
[  5%] Building CXX object src/CMakeFiles/threepp.dir/threepp/core/Layers.cpp.obj
[  5%] Building CXX object src/CMakeFiles/threepp.dir/threepp/core/Object3D.cpp.obj
[  6%] Building CXX object src/CMakeFiles/threepp.dir/threepp/core/Raycaster.cpp.obj
[  6%] Building CXX object src/CMakeFiles/threepp.dir/threepp/core/Uniform.cpp.obj
[  6%] Building CXX object src/CMakeFiles/threepp.dir/threepp/extras/ShapeUtils.cpp.obj
[  7%] Building CXX object src/CMakeFiles/threepp.dir/threepp/extras/core/Curve.cpp.obj
[  7%] Building CXX object src/CMakeFiles/threepp.dir/threepp/extras/core/CurvePath.cpp.obj
[  8%] Building CXX object src/CMakeFiles/threepp.dir/threepp/extras/core/Font.cpp.obj
[  8%] Building CXX object src/CMakeFiles/threepp.dir/threepp/extras/core/Path.cpp.obj
[  9%] Building CXX object src/CMakeFiles/threepp.dir/threepp/extras/core/Shape.cpp.obj
[  9%] Building CXX object src/CMakeFiles/threepp.dir/threepp/extras/core/ShapePath.cpp.obj
[  9%] Building CXX object src/CMakeFiles/threepp.dir/threepp/extras/curves/CatmullRomCurve3.cpp.obj
[ 10%] Building CXX object src/CMakeFiles/threepp.dir/threepp/extras/curves/CubicBezierCurve.cpp.obj
[ 10%] Building CXX object src/CMakeFiles/threepp.dir/threepp/extras/curves/CubicBezierCurve3.cpp.obj
[ 11%] Building CXX object src/CMakeFiles/threepp.dir/threepp/extras/curves/EllipseCurve.cpp.obj
[ 11%] Building CXX object src/CMakeFiles/threepp.dir/threepp/extras/curves/LineCurve.cpp.obj
[ 12%] Building CXX object src/CMakeFiles/threepp.dir/threepp/extras/curves/QuadraticBezierCurve.cpp.obj
[ 12%] Building CXX object src/CMakeFiles/threepp.dir/threepp/extras/curves/QuadraticBezierCurve3.cpp.obj
[ 12%] Building CXX object src/CMakeFiles/threepp.dir/threepp/extras/curves/SplineCurve.cpp.obj
[ 13%] Building CXX object src/CMakeFiles/threepp.dir/threepp/geometries/BoxGeometry.cpp.obj
[ 13%] Building CXX object src/CMakeFiles/threepp.dir/threepp/geometries/CapsuleGeometry.cpp.obj
[ 14%] Building CXX object src/CMakeFiles/threepp.dir/threepp/geometries/CircleGeometry.cpp.obj
[ 14%] Building CXX object src/CMakeFiles/threepp.dir/threepp/geometries/ConeGeometry.cpp.obj
[ 15%] Building CXX object src/CMakeFiles/threepp.dir/threepp/geometries/ConvexGeometry.cpp.obj
[ 15%] Building CXX object src/CMakeFiles/threepp.dir/threepp/geometries/CylinderGeometry.cpp.obj
[ 16%] Building CXX object src/CMakeFiles/threepp.dir/threepp/geometries/DecalGeometry.cpp.obj
[ 16%] Building CXX object src/CMakeFiles/threepp.dir/threepp/geometries/EdgesGeometry.cpp.obj
[ 16%] Building CXX object src/CMakeFiles/threepp.dir/threepp/geometries/ExtrudeGeometry.cpp.obj
[ 17%] Building CXX object src/CMakeFiles/threepp.dir/threepp/geometries/IcosahedronGeometry.cpp.obj
[ 17%] Building CXX object src/CMakeFiles/threepp.dir/threepp/geometries/LatheGeometry.cpp.obj
[ 18%] Building CXX object src/CMakeFiles/threepp.dir/threepp/geometries/OctahedronGeometry.cpp.obj
[ 18%] Building CXX object src/CMakeFiles/threepp.dir/threepp/geometries/PlaneGeometry.cpp.obj
[ 19%] Building CXX object src/CMakeFiles/threepp.dir/threepp/geometries/PolyhedronGeometry.cpp.obj
[ 19%] Building CXX object src/CMakeFiles/threepp.dir/threepp/geometries/RingGeometry.cpp.obj
[ 19%] Building CXX object src/CMakeFiles/threepp.dir/threepp/geometries/ShapeGeometry.cpp.obj
[ 20%] Building CXX object src/CMakeFiles/threepp.dir/threepp/geometries/SphereGeometry.cpp.obj
[ 20%] Building CXX object src/CMakeFiles/threepp.dir/threepp/geometries/TorusGeometry.cpp.obj
[ 21%] Building CXX object src/CMakeFiles/threepp.dir/threepp/geometries/TorusKnotGeometry.cpp.obj
[ 21%] Building CXX object src/CMakeFiles/threepp.dir/threepp/geometries/TubeGeometry.cpp.obj
[ 22%] Building CXX object src/CMakeFiles/threepp.dir/threepp/geometries/WireframeGeometry.cpp.obj
[ 22%] Building CXX object src/CMakeFiles/threepp.dir/threepp/helpers/ArrowHelper.cpp.obj
[ 22%] Building CXX object src/CMakeFiles/threepp.dir/threepp/helpers/AxesHelper.cpp.obj
[ 23%] Building CXX object src/CMakeFiles/threepp.dir/threepp/helpers/Box3Helper.cpp.obj
[ 23%] Building CXX object src/CMakeFiles/threepp.dir/threepp/helpers/BoxHelper.cpp.obj
[ 24%] Building CXX object src/CMakeFiles/threepp.dir/threepp/helpers/CameraHelper.cpp.obj
[ 24%] Building CXX object src/CMakeFiles/threepp.dir/threepp/helpers/DirectionalLightHelper.cpp.obj
[ 25%] Building CXX object src/CMakeFiles/threepp.dir/threepp/helpers/GridHelper.cpp.obj
[ 25%] Building CXX object src/CMakeFiles/threepp.dir/threepp/helpers/HemisphereLightHelper.cpp.obj
[ 25%] Building CXX object src/CMakeFiles/threepp.dir/threepp/helpers/PlaneHelper.cpp.obj
[ 26%] Building CXX object src/CMakeFiles/threepp.dir/threepp/helpers/PointLightHelper.cpp.obj
[ 26%] Building CXX object src/CMakeFiles/threepp.dir/threepp/helpers/PolarGridHelper.cpp.obj
[ 27%] Building CXX object src/CMakeFiles/threepp.dir/threepp/helpers/SkeletonHelper.cpp.obj
[ 27%] Building CXX object src/CMakeFiles/threepp.dir/threepp/helpers/SpotLightHelper.cpp.obj
[ 28%] Building CXX object src/CMakeFiles/threepp.dir/threepp/input/PeripheralsEventSource.cpp.obj
[ 28%] Building CXX object src/CMakeFiles/threepp.dir/threepp/loaders/FontLoader.cpp.obj
[ 29%] Building CXX object src/CMakeFiles/threepp.dir/threepp/loaders/ImageLoader.cpp.obj
[ 29%] Building CXX object src/CMakeFiles/threepp.dir/threepp/loaders/MTLLoader.cpp.obj
[ 29%] Building CXX object src/CMakeFiles/threepp.dir/threepp/loaders/OBJLoader.cpp.obj
[ 30%] Building CXX object src/CMakeFiles/threepp.dir/threepp/loaders/STLLoader.cpp.obj
[ 30%] Building CXX object src/CMakeFiles/threepp.dir/threepp/loaders/TextureLoader.cpp.obj
[ 31%] Building CXX object src/CMakeFiles/threepp.dir/threepp/materials/LineBasicMaterial.cpp.obj
[ 31%] Building CXX object src/CMakeFiles/threepp.dir/threepp/materials/Material.cpp.obj
[ 32%] Building CXX object src/CMakeFiles/threepp.dir/threepp/materials/MeshBasicMaterial.cpp.obj
[ 32%] Building CXX object src/CMakeFiles/threepp.dir/threepp/materials/MeshLambertMaterial.cpp.obj
[ 32%] Building CXX object src/CMakeFiles/threepp.dir/threepp/materials/MeshNormalMaterial.cpp.obj
[ 33%] Building CXX object src/CMakeFiles/threepp.dir/threepp/materials/MeshPhongMaterial.cpp.obj
[ 33%] Building CXX object src/CMakeFiles/threepp.dir/threepp/materials/MeshStandardMaterial.cpp.obj
[ 34%] Building CXX object src/CMakeFiles/threepp.dir/threepp/materials/PointsMaterial.cpp.obj
[ 34%] Building CXX object src/CMakeFiles/threepp.dir/threepp/materials/RawShaderMaterial.cpp.obj
[ 35%] Building CXX object src/CMakeFiles/threepp.dir/threepp/materials/ShaderMaterial.cpp.obj
[ 35%] Building CXX object src/CMakeFiles/threepp.dir/threepp/materials/SpriteMaterial.cpp.obj
[ 35%] Building CXX object src/CMakeFiles/threepp.dir/threepp/math/Box2.cpp.obj
[ 36%] Building CXX object src/CMakeFiles/threepp.dir/threepp/math/Box3.cpp.obj
[ 36%] Building CXX object src/CMakeFiles/threepp.dir/threepp/math/Capsule.cpp.obj
[ 37%] Building CXX object src/CMakeFiles/threepp.dir/threepp/math/Color.cpp.obj
[ 37%] Building CXX object src/CMakeFiles/threepp.dir/threepp/math/Cylindrical.cpp.obj
[ 38%] Building CXX object src/CMakeFiles/threepp.dir/threepp/math/Euler.cpp.obj
[ 38%] Building CXX object src/CMakeFiles/threepp.dir/threepp/math/Frustum.cpp.obj
[ 38%] Building CXX object src/CMakeFiles/threepp.dir/threepp/math/ImprovedNoise.cpp.obj
[ 39%] Building CXX object src/CMakeFiles/threepp.dir/threepp/math/Line3.cpp.obj
[ 39%] Building CXX object src/CMakeFiles/threepp.dir/threepp/math/MathUtils.cpp.obj
[ 40%] Building CXX object src/CMakeFiles/threepp.dir/threepp/math/Matrix3.cpp.obj
[ 40%] Building CXX object src/CMakeFiles/threepp.dir/threepp/math/Matrix4.cpp.obj
[ 41%] Building CXX object src/CMakeFiles/threepp.dir/threepp/math/Plane.cpp.obj
[ 41%] Building CXX object src/CMakeFiles/threepp.dir/threepp/math/Ray.cpp.obj
[ 41%] Building CXX object src/CMakeFiles/threepp.dir/threepp/math/Sphere.cpp.obj
[ 42%] Building CXX object src/CMakeFiles/threepp.dir/threepp/math/Spherical.cpp.obj
[ 42%] Building CXX object src/CMakeFiles/threepp.dir/threepp/math/SphericalHarmonics3.cpp.obj
[ 43%] Building CXX object src/CMakeFiles/threepp.dir/threepp/math/Triangle.cpp.obj
[ 43%] Building CXX object src/CMakeFiles/threepp.dir/threepp/math/Vector2.cpp.obj
[ 44%] Building CXX object src/CMakeFiles/threepp.dir/threepp/math/Vector3.cpp.obj
[ 44%] Building CXX object src/CMakeFiles/threepp.dir/threepp/math/Vector4.cpp.obj
[ 45%] Building CXX object src/CMakeFiles/threepp.dir/threepp/math/Quaternion.cpp.obj
[ 45%] Building CXX object src/CMakeFiles/threepp.dir/threepp/lights/AmbientLight.cpp.obj
[ 45%] Building CXX object src/CMakeFiles/threepp.dir/threepp/lights/DirectionalLight.cpp.obj
[ 46%] Building CXX object src/CMakeFiles/threepp.dir/threepp/lights/HemisphereLight.cpp.obj
[ 46%] Building CXX object src/CMakeFiles/threepp.dir/threepp/lights/Light.cpp.obj
[ 47%] Building CXX object src/CMakeFiles/threepp.dir/threepp/lights/LightShadow.cpp.obj
[ 47%] Building CXX object src/CMakeFiles/threepp.dir/threepp/lights/PointLight.cpp.obj
[ 48%] Building CXX object src/CMakeFiles/threepp.dir/threepp/lights/PointLightShadow.cpp.obj
[ 48%] Building CXX object src/CMakeFiles/threepp.dir/threepp/lights/SpotLight.cpp.obj
[ 48%] Building CXX object src/CMakeFiles/threepp.dir/threepp/lights/SpotLightShadow.cpp.obj
[ 49%] Building CXX object src/CMakeFiles/threepp.dir/threepp/scenes/Scene.cpp.obj
[ 49%] Building CXX object src/CMakeFiles/threepp.dir/threepp/scenes/Fog.cpp.obj
[ 50%] Building CXX object src/CMakeFiles/threepp.dir/threepp/scenes/FogExp2.cpp.obj
[ 50%] Building CXX object src/CMakeFiles/threepp.dir/threepp/objects/Group.cpp.obj
[ 51%] Building CXX object src/CMakeFiles/threepp.dir/threepp/objects/HUD.cpp.obj
[ 51%] Building CXX object src/CMakeFiles/threepp.dir/threepp/objects/Line.cpp.obj
[ 51%] Building CXX object src/CMakeFiles/threepp.dir/threepp/objects/LineLoop.cpp.obj
[ 52%] Building CXX object src/CMakeFiles/threepp.dir/threepp/objects/LineSegments.cpp.obj
[ 52%] Building CXX object src/CMakeFiles/threepp.dir/threepp/objects/LOD.cpp.obj
[ 53%] Building CXX object src/CMakeFiles/threepp.dir/threepp/objects/InstancedMesh.cpp.obj
[ 53%] Building CXX object src/CMakeFiles/threepp.dir/threepp/objects/Mesh.cpp.obj
[ 54%] Building CXX object src/CMakeFiles/threepp.dir/threepp/objects/Points.cpp.obj
[ 54%] Building CXX object src/CMakeFiles/threepp.dir/threepp/objects/Skeleton.cpp.obj
[ 54%] Building CXX object src/CMakeFiles/threepp.dir/threepp/objects/SkinnedMesh.cpp.obj
[ 55%] Building CXX object src/CMakeFiles/threepp.dir/threepp/objects/Sky.cpp.obj
[ 55%] Building CXX object src/CMakeFiles/threepp.dir/threepp/objects/Sprite.cpp.obj
[ 56%] Building CXX object src/CMakeFiles/threepp.dir/threepp/objects/Reflector.cpp.obj
[ 56%] Building CXX object src/CMakeFiles/threepp.dir/threepp/objects/Water.cpp.obj
[ 57%] Building CXX object src/CMakeFiles/threepp.dir/threepp/textures/Texture.cpp.obj
[ 57%] Building CXX object src/CMakeFiles/threepp.dir/threepp/textures/DataTexture3D.cpp.obj
[ 58%] Building CXX object src/CMakeFiles/threepp.dir/threepp/utils/BufferGeometryUtils.cpp.obj
[ 58%] Building CXX object src/CMakeFiles/threepp.dir/threepp/utils/StringUtils.cpp.obj
[ 58%] Building CXX object src/CMakeFiles/threepp.dir/threepp/utils/ThreadPool.cpp.obj
[ 59%] Building CXX object src/CMakeFiles/threepp.dir/threepp/renderers/GLRenderer.cpp.obj
[ 59%] Building CXX object src/CMakeFiles/threepp.dir/threepp/renderers/GLRenderTarget.cpp.obj
[ 60%] Building CXX object src/CMakeFiles/threepp.dir/threepp/renderers/gl/GLAttributes.cpp.obj
[ 60%] Building CXX object src/CMakeFiles/threepp.dir/threepp/renderers/gl/GLBackground.cpp.obj
[ 61%] Building CXX object src/CMakeFiles/threepp.dir/threepp/renderers/gl/GLBindingStates.cpp.obj
[ 61%] Building CXX object src/CMakeFiles/threepp.dir/threepp/renderers/gl/GLBufferRenderer.cpp.obj
[ 61%] Building CXX object src/CMakeFiles/threepp.dir/threepp/renderers/gl/GLClipping.cpp.obj
[ 62%] Building CXX object src/CMakeFiles/threepp.dir/threepp/renderers/gl/GLGeometries.cpp.obj
[ 62%] Building CXX object src/CMakeFiles/threepp.dir/threepp/renderers/gl/GLInfo.cpp.obj
[ 63%] Building CXX object src/CMakeFiles/threepp.dir/threepp/renderers/gl/GLLights.cpp.obj
[ 63%] Building CXX object src/CMakeFiles/threepp.dir/threepp/renderers/gl/GLObjects.cpp.obj
[ 64%] Building CXX object src/CMakeFiles/threepp.dir/threepp/renderers/gl/GLProgram.cpp.obj
[ 64%] Building CXX object src/CMakeFiles/threepp.dir/threepp/renderers/gl/GLPrograms.cpp.obj
[ 64%] Building CXX object src/CMakeFiles/threepp.dir/threepp/renderers/gl/GLMaterials.cpp.obj
[ 65%] Building CXX object src/CMakeFiles/threepp.dir/threepp/renderers/gl/GLRenderLists.cpp.obj
[ 65%] Building CXX object src/CMakeFiles/threepp.dir/threepp/renderers/gl/GLRenderStates.cpp.obj
[ 66%] Building CXX object src/CMakeFiles/threepp.dir/threepp/renderers/gl/GLShadowMap.cpp.obj
[ 66%] Building CXX object src/CMakeFiles/threepp.dir/threepp/renderers/gl/GLState.cpp.obj
[ 67%] Building CXX object src/CMakeFiles/threepp.dir/threepp/renderers/gl/GLTextures.cpp.obj
[ 67%] Building CXX object src/CMakeFiles/threepp.dir/threepp/renderers/gl/GLUniforms.cpp.obj
[ 67%] Building CXX object src/CMakeFiles/threepp.dir/threepp/renderers/gl/ProgramParameters.cpp.obj
[ 68%] Building CXX object src/CMakeFiles/threepp.dir/threepp/renderers/shaders/ShaderLib.cpp.obj
[ 68%] Building CXX object src/CMakeFiles/threepp.dir/__/generated/threepp/renderers/shaders/ShaderChunk.cpp.obj
[ 69%] Linking CXX shared library ..\bin\libthreepp.dll
[ 69%] Built target threepp
[ 69%] Building CXX object examples/CMakeFiles/demo.dir/demo.cpp.obj
[ 70%] Linking CXX executable ..\bin\demo.exe
[ 70%] Built target demo
[ 70%] Building CXX object examples/animation/CMakeFiles/simple_skinning.dir/simple_skinning.cpp.obj
[ 71%] Linking CXX executable ..\..\bin\simple_skinning.exe
[ 71%] Built target simple_skinning
[ 72%] Building CXX object examples/controls/CMakeFiles/fly.dir/fly.cpp.obj
[ 72%] Linking CXX executable ..\..\bin\fly.exe
[ 72%] Built target fly
[ 73%] Building CXX object examples/extras/core/CMakeFiles/fonts.dir/fonts.cpp.obj
[ 73%] Linking CXX executable ..\..\..\bin\fonts.exe
[ 73%] Built target fonts
[ 74%] Building CXX object examples/extras/curves/CMakeFiles/catmull_room_curve3.dir/catmull_room_curve3.cpp.obj
[ 74%] Linking CXX executable ..\..\..\bin\catmull_room_curve3.exe
[ 74%] Built target catmull_room_curve3
[ 74%] Building CXX object examples/extras/curves/CMakeFiles/cubic_bezier_curve.dir/cubic_bezier_curve.cpp.obj
[ 75%] Linking CXX executable ..\..\..\bin\cubic_bezier_curve.exe
[ 75%] Built target cubic_bezier_curve
[ 75%] Building CXX object examples/geometries/CMakeFiles/geometries.dir/geometries.cpp.obj
[ 76%] Linking CXX executable ..\..\bin\geometries.exe
[ 76%] Built target geometries
[ 77%] Building CXX object examples/geometries/CMakeFiles/lathe_geometry.dir/lathe_geometry.cpp.obj
[ 77%] Linking CXX executable ..\..\bin\lathe_geometry.exe
[ 77%] Built target lathe_geometry
[ 77%] Building CXX object examples/geometries/CMakeFiles/tube_geometry.dir/tube_geometry.cpp.obj
[ 78%] Linking CXX executable ..\..\bin\tube_geometry.exe
[ 78%] Built target tube_geometry
[ 78%] Building CXX object examples/geometries/CMakeFiles/shape_geometry.dir/shape_geometry.cpp.obj
[ 79%] Linking CXX executable ..\..\bin\shape_geometry.exe
[ 79%] Built target shape_geometry
[ 80%] Building CXX object examples/geometries/CMakeFiles/convex_geometry.dir/convex_geometry.cpp.obj
[ 80%] Linking CXX executable ..\..\bin\convex_geometry.exe
[ 80%] Built target convex_geometry
[ 80%] Building CXX object examples/geometries/CMakeFiles/heightmap.dir/heightmap.cpp.obj
[ 81%] Linking CXX executable ..\..\bin\heightmap.exe
[ 81%] Built target heightmap
[ 82%] Building CXX object examples/geometries/CMakeFiles/dynamic.dir/dynamic.cpp.obj
[ 82%] Linking CXX executable ..\..\bin\dynamic.exe
[ 82%] Built target dynamic
[ 82%] Building CXX object examples/helpers/CMakeFiles/helpers.dir/helpers.cpp.obj
[ 83%] Linking CXX executable ..\..\bin\helpers.exe
[ 83%] Built target helpers
[ 84%] Building CXX object examples/helpers/CMakeFiles/camera_helper.dir/camera_helper.cpp.obj
[ 84%] Linking CXX executable ..\..\bin\camera_helper.exe
[ 84%] Built target camera_helper
[ 84%] Building CXX object examples/lights/CMakeFiles/hemi_light.dir/hemi_light.cpp.obj
[ 84%] Linking CXX executable ..\..\bin\hemi_light.exe
[ 84%] Built target hemi_light
[ 84%] Building CXX object examples/lights/CMakeFiles/point_light.dir/point_light.cpp.obj
[ 85%] Linking CXX executable ..\..\bin\point_light.exe
[ 85%] Built target point_light
[ 85%] Building CXX object examples/lights/CMakeFiles/spot_light.dir/spot_light.cpp.obj
[ 86%] Linking CXX executable ..\..\bin\spot_light.exe
[ 86%] Built target spot_light
[ 86%] Building CXX object examples/lights/CMakeFiles/directional.dir/directional.cpp.obj
[ 86%] Linking CXX executable ..\..\bin\directional.exe
[ 86%] Built target directional
[ 87%] Building CXX object examples/loaders/CMakeFiles/stl_loader.dir/stl_loader.cpp.obj
[ 87%] Linking CXX executable ..\..\bin\stl_loader.exe
[ 87%] Built target stl_loader
[ 87%] Building CXX object examples/loaders/CMakeFiles/obj_loader.dir/obj_loader.cpp.obj
[ 88%] Linking CXX executable ..\..\bin\obj_loader.exe
[ 88%] Built target obj_loader
[ 88%] Building CXX object examples/loaders/CMakeFiles/assimp_loader.dir/assimp_loader.cpp.obj
[ 88%] Linking CXX executable ..\..\bin\assimp_loader.exe
[ 88%] Built target assimp_loader
[ 89%] Building CXX object examples/loaders/CMakeFiles/svg_loader.dir/svg_loader.cpp.obj
[ 89%] Linking CXX executable ..\..\bin\svg_loader.exe
[ 89%] Built target svg_loader
[ 90%] Building CXX object examples/misc/CMakeFiles/raycast.dir/raycast.cpp.obj
[ 90%] Linking CXX executable ..\..\bin\raycast.exe
[ 90%] Built target raycast
[ 90%] Building CXX object examples/misc/CMakeFiles/mouse_key_listener.dir/mouse_key_listener.cpp.obj
[ 91%] Linking CXX executable ..\..\bin\mouse_key_listener.exe
[ 91%] Built target mouse_key_listener
[ 92%] Building CXX object examples/misc/CMakeFiles/morphtargets_sphere.dir/morphtargets_sphere.cpp.obj
[ 92%] Linking CXX executable ..\..\bin\morphtargets_sphere.exe
[ 92%] Built target morphtargets_sphere
[ 93%] Building CXX object examples/objects/CMakeFiles/instancing.dir/instancing.cpp.obj
[ 93%] Linking CXX executable ..\..\bin\instancing.exe
[ 93%] Built target instancing
[ 93%] Building CXX object examples/objects/CMakeFiles/sprite.dir/sprite.cpp.obj
[ 93%] Linking CXX executable ..\..\bin\sprite.exe
[ 93%] Built target sprite
[ 94%] Building CXX object examples/objects/CMakeFiles/lod.dir/lod.cpp.obj
[ 94%] Linking CXX executable ..\..\bin\lod.exe
[ 94%] Built target lod
[ 94%] Building CXX object examples/objects/CMakeFiles/points.dir/points.cpp.obj
[ 94%] Linking CXX executable ..\..\bin\points.exe
[ 94%] Built target points
[ 94%] Building CXX object examples/objects/CMakeFiles/water.dir/water.cpp.obj
[ 95%] Linking CXX executable ..\..\bin\water.exe
[ 95%] Built target water
[ 96%] Building CXX object examples/shaders/CMakeFiles/raw_shader.dir/raw_shader.cpp.obj
[ 96%] Linking CXX executable ..\..\bin\raw_shader.exe
[ 96%] Built target raw_shader
[ 97%] Building CXX object examples/shaders/CMakeFiles/seascape_demo.dir/seascape_demo.cpp.obj
[ 97%] Linking CXX executable ..\..\bin\seascape_demo.exe
[ 97%] Built target seascape_demo
[ 98%] Building CXX object examples/textures/CMakeFiles/texture3d.dir/texture3d.cpp.obj
[ 98%] Linking CXX executable ..\..\bin\texture3d.exe
[ 98%] Built target texture3d
[ 99%] Building CXX object examples/textures/CMakeFiles/texture2d.dir/texture2d.cpp.obj
[ 99%] Linking CXX executable ..\..\bin\texture2d.exe
[ 99%] Built target texture2d
[ 99%] Building CXX object examples/textures/CMakeFiles/data_texture.dir/data_texture.cpp.obj
[100%] Linking CXX executable ..\..\bin\data_texture.exe
[100%] Built target data_texture

Then I can "cd bin" to the "build/bin" folder, and type: ./demo.exe to run all kinds of demos, that's so nice!

Thanks.

asmwarrior commented 9 months ago

I might just include glad with the repo in the future.

Yes, I agree with this.

asmwarrior commented 9 months ago

FYI: I'm testing the branch: https://github.com/markaren/threepp/tree/dev

cmake works fine here without any other code changes, in my msys2/mingw64 shell. Great!