Rebuild project

This commit is contained in:
Stan Fortonski
2020-07-19 17:23:27 +02:00
parent 15f481722f
commit ee0b861a04
39 changed files with 14 additions and 18 deletions

View File

@ -1,8 +0,0 @@
@echo off
move CMakeLists.txt cmake
cd cmake
cmake -G "MinGW Makefiles" .
mingw32-make -j6
move CMakeLists.txt ..
pause

View File

@ -7,16 +7,14 @@ include_directories(include)
link_directories(${CMAKE_SOURCE_DIR}/lib)
include_directories(${CMAKE_BINARY_DIR}/include)
INCLUDE(CMakeForceCompiler)
CMAKE_FORCE_CXX_COMPILER(g++ GNU)
add_compile_options(-m64)
set(ENGINE_NAME engine)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_CXX_FLAGS "-O4")
set(BUILD_SHARED_LIBS True)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/../build)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/../build)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/build)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/build)
set(CMAKE_BUILD_TYPE Release)
find_package(OpenGL REQUIRED)
@ -26,7 +24,7 @@ find_package(GLFW3 REQUIRED)
find_package(ASSIMP REQUIRED)
find_package(Freetype REQUIRED)
set(LIBS glfw3 gdi32 opengl32 glew32 assimp zlibstatic)
set(LIBS glfw gdi32 opengl32 glew32 assimp zlibstatic)
include_directories(
"${CMAKE_SOURCE_DIR}/src"
@ -34,11 +32,11 @@ include_directories(
)
#make stb_image lib
add_library(stb_image ${CMAKE_SOURCE_DIR}/../../src/stb_image.cpp)
add_library(stb_image ${CMAKE_SOURCE_DIR}/src/stb_image.cpp)
set(LIBS ${LIBS} stb_image)
#make engine lib
file(GLOB_RECURSE SOURCES ${CMAKE_SOURCE_DIR}/../../src/engine/*.cpp)
file(GLOB_RECURSE SOURCES ${CMAKE_SOURCE_DIR}/src/engine/*.cpp)
add_library(${ENGINE_NAME} ${SOURCES})
set(LIBS ${LIBS} ${FREETYPE_LIBRARIES})
@ -46,7 +44,7 @@ target_link_libraries(${ENGINE_NAME} ${LIBS})
target_include_directories(${ENGINE_NAME} PRIVATE ${FREETYPE_INCLUDE_DIRS})
#make exe file
file(GLOB_RECURSE SOURCES ${CMAKE_SOURCE_DIR}/../src/*.cpp)
file(GLOB_RECURSE SOURCES ${CMAKE_SOURCE_DIR}/src/generator/*.cpp)
add_executable(${PROJECT_NAME} ${SOURCES})
target_link_libraries(

2
build/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*.dll
*.exe

View File

Before

Width:  |  Height:  |  Size: 609 KiB

After

Width:  |  Height:  |  Size: 609 KiB

View File

Before

Width:  |  Height:  |  Size: 648 KiB

After

Width:  |  Height:  |  Size: 648 KiB

View File

Before

Width:  |  Height:  |  Size: 671 KiB

After

Width:  |  Height:  |  Size: 671 KiB

View File

Before

Width:  |  Height:  |  Size: 673 KiB

After

Width:  |  Height:  |  Size: 673 KiB

View File

Before

Width:  |  Height:  |  Size: 642 KiB

After

Width:  |  Height:  |  Size: 642 KiB

View File

Before

Width:  |  Height:  |  Size: 634 KiB

After

Width:  |  Height:  |  Size: 634 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 MiB

After

Width:  |  Height:  |  Size: 2.8 MiB

View File

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

View File

Before

Width:  |  Height:  |  Size: 495 KiB

After

Width:  |  Height:  |  Size: 495 KiB

View File

Before

Width:  |  Height:  |  Size: 166 KiB

After

Width:  |  Height:  |  Size: 166 KiB

5
comp.bat Normal file
View File

@ -0,0 +1,5 @@
@echo off
cmake -G "MinGW Makefiles" .
mingw32-make
pause

View File

@ -6,7 +6,6 @@
#include <stdexcept>
#include <vector>
#include <GL/glew.h>
#include <GL/glext.h>
#include <stb_image.h>
#include "../Config.hpp"