Remove dependency cycle (build for windows is working?)
This commit is contained in:
		@@ -10,6 +10,7 @@ add_executable(couch core/couch.cpp)
 | 
			
		||||
 | 
			
		||||
add_subdirectory(core)
 | 
			
		||||
target_link_libraries(couch couchlib)
 | 
			
		||||
target_link_libraries(couch couchlib_luascripting)
 | 
			
		||||
 | 
			
		||||
add_subdirectory(scripting)
 | 
			
		||||
if (LUA_ENABLED)
 | 
			
		||||
 
 | 
			
		||||
@@ -53,8 +53,6 @@ target_sources(couchlib PUBLIC
 | 
			
		||||
  Vertex.cpp
 | 
			
		||||
  World.h
 | 
			
		||||
  World.cpp
 | 
			
		||||
  Scripting/Lua.h
 | 
			
		||||
  Scripting/Lua.cpp
 | 
			
		||||
  Scripting/ScriptingLanguage.h
 | 
			
		||||
  Scripting/ScriptingLanguage.cpp
 | 
			
		||||
  Shaders/FlatShader.h
 | 
			
		||||
@@ -66,6 +64,14 @@ target_sources(couchlib PUBLIC
 | 
			
		||||
  Shaders/SkyboxShader.h
 | 
			
		||||
  Shaders/SkyboxShader.cpp)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
add_library(couchlib_luascripting SHARED)
 | 
			
		||||
target_sources(couchlib_luascripting PUBLIC
 | 
			
		||||
  Scripting/Lua.h
 | 
			
		||||
  Scripting/Lua.cpp)
 | 
			
		||||
target_link_libraries(couchlib_luascripting couchlua)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
target_include_directories(couchlib
 | 
			
		||||
  PUBLIC
 | 
			
		||||
  ${CMAKE_CURRENT_SOURCE_DIR})
 | 
			
		||||
@@ -78,13 +84,11 @@ target_include_directories(couchlib
 | 
			
		||||
  PUBLIC
 | 
			
		||||
  ${ASSIMP_INCLUDE_DIR})
 | 
			
		||||
 | 
			
		||||
if(NOT WIN32)
 | 
			
		||||
  target_link_libraries(couchlib glfw)
 | 
			
		||||
endif()
 | 
			
		||||
target_link_libraries(couchlib glfw)
 | 
			
		||||
target_link_libraries(couchlib OpenGL::GL)
 | 
			
		||||
target_link_libraries(couchlib GLEW::GLEW)
 | 
			
		||||
if (LUA_ENABLED)
 | 
			
		||||
  target_link_libraries(couchlib ${LUA_LIBRARIES})
 | 
			
		||||
  target_link_libraries(couchlib_luascripting ${LUA_LIBRARIES})
 | 
			
		||||
endif () 
 | 
			
		||||
target_link_libraries(couchlib ${BULLET_LIBRARIES})
 | 
			
		||||
target_link_libraries(couchlib ${ASSIMP_LIBRARY})
 | 
			
		||||
 
 | 
			
		||||
@@ -1,3 +1,7 @@
 | 
			
		||||
// NOTE: Do this here and only here, stbi will be defined where
 | 
			
		||||
// this macro is included
 | 
			
		||||
#define STB_IMAGE_IMPLEMENTATION
 | 
			
		||||
 | 
			
		||||
#include "Material.h"
 | 
			
		||||
 | 
			
		||||
#include <string>
 | 
			
		||||
 
 | 
			
		||||
@@ -29,10 +29,6 @@
 | 
			
		||||
 | 
			
		||||
#include "Scripting/Lua.h"
 | 
			
		||||
 | 
			
		||||
// Thirdparty Includes
 | 
			
		||||
#define STB_IMAGE_IMPLEMENTATION
 | 
			
		||||
#include "stb_image.h"
 | 
			
		||||
 | 
			
		||||
Window *window;
 | 
			
		||||
 | 
			
		||||
const int width = 800;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user