Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
FrodoAlaska committed Aug 21, 2024
1 parent 8790987 commit 00214e6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
28 changes: 15 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,32 @@ set(LINUX_COMPILER_PATH /usr/bin)
set(BUILD_PLATFORM) # Set the platform you want to build for when initially building this cmake file
##########################################################

# Directory-specific variables
##########################################################
set(SRC_DIR ${CMAKE_SOURCE_DIR}/src)
set(ENGINE_SRC_DIR ${CMAKE_SOURCE_DIR}/src/engine)
set(APP_SRC_DIR ${CMAKE_SOURCE_DIR}/src/app)
set(EDITOR_SRC_DIR ${CMAKE_SOURCE_DIR}/src/editor)
set(LIBS_DIR ${CMAKE_SOURCE_DIR}/libs/)
##########################################################

# Build flags. This will be added on later
##########################################################
set(BUILD_FLAGS GLFW_INCLUDE_NONE APP_DEBUG EDITOR_ACTIVE)
set(BUILD_FLAGS GLFW_INCLUDE_NONE)
##########################################################

# Defining states depending on the platform
##########################################################
if(BUILD_PLATFORM STREQUAL "PLAT_WINDOWS")
set(CMAKE_CXX_COMPILER ${WINDOWS_COMPILER_PATH}/x86_64-w64-mingw32-g++)
set(CMAKE_C_COMPILER ${WINDOWS_COMPILER_PATH}/x86_64-w64-mingw32-gcc)
list(APPEND BUILD_FLAGS PLAT_WINDOWS)
elseif(BUILD_PLATFORM STREQUAL "PLAT_LINUX")
set(CMAKE_CXX_COMPILER ${LINUX_COMPILER_PATH}/c++)
set(CMAKE_C_COMPILER ${LINUX_COMPILER_PATH}/c)
set(CMAKE_C_COMPILER ${LINUX_COMPILER_PATH}/cc)
list(APPEND BUILD_FLAGS PLAT_LINUX)
endif()
##########################################################

# Directory-specific variables
##########################################################
set(SRC_DIR ${CMAKE_SOURCE_DIR}/src)
set(ENGINE_SRC_DIR ${CMAKE_SOURCE_DIR}/src/engine)
set(APP_SRC_DIR ${CMAKE_SOURCE_DIR}/src/app)
set(EDITOR_SRC_DIR ${CMAKE_SOURCE_DIR}/src/editor)
set(LIBS_DIR ${CMAKE_SOURCE_DIR}/libs/)
##########################################################

# Sources
##########################################################
Expand Down Expand Up @@ -137,7 +139,7 @@ set(LIBS_SOURCES
${LIBS_DIR}/imgui/backends/imgui_impl_glfw.cpp
${LIBS_DIR}/imgui/backends/imgui_impl_opengl3.cpp

${LIBS_DIR}/tinyobjloader/tiny_obj_loader.cc
${LIBS_DIR}/tinyobjloader/tiny_obj_loader.cpp
)
##########################################################

Expand All @@ -148,7 +150,7 @@ add_executable(${PROJECT_NAME} ${ENGINE_SOURCES} ${APP_SOURCES} ${EDITOR_SOURCES
file(COPY assets DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

target_compile_definitions(${PROJECT_NAME} PRIVATE ${BUILD_FLAGS})
target_compile_options(${PROJECT_NAME} PRIVATE -lm -Wno-deprecated)
target_compile_options(${PROJECT_NAME} PRIVATE -lm -Wno-deprecated -O3)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20)

target_include_directories(${PROJECT_NAME} PUBLIC BEFORE ${LIBS_DIR} ${SRC_DIR} ${ENGINE_SRC_DIR} ${APP_SRC_DIR} ${EDITOR_SRC_DIR})
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Even though this project handles all of its dependencies by building them and ge
- MiniAudio
- stb_image
- stb_truetype
- tinyobjloader

However, as mentioned before, there is no need to handle any of these dependencies yourself. They are all--hopefully--ready for use when you clone the repository.

Expand Down
File renamed without changes.

0 comments on commit 00214e6

Please sign in to comment.