CONGE-1 Made it work for windows and mac for both release and debug

This commit is contained in:
Jimmy Tremblay-Bernier 2024-11-21 15:32:56 -05:00
parent 6ffd75fb04
commit af2d1c0683
8 changed files with 26 additions and 34 deletions

View File

@ -8,6 +8,8 @@ if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Build type (default Debug)" FORCE)
endif()
message(${CMAKE_BUILD_TYPE})
# Set architecture
if(NOT DEFINED ARCH)
set(ARCH x64) # Default to x64 architecture
@ -26,10 +28,6 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/intermediates/${CMAKE_BUI
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/${CMAKE_BUILD_TYPE}/${ARCH}/${PROJECT_NAME})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/${CMAKE_BUILD_TYPE}/${ARCH}/${PROJECT_NAME})
# Locate packages using find_package
find_package(glm REQUIRED)
find_package(SDL2 REQUIRED)
# Add subdirectories for engine and demo
add_subdirectory(./ConjureEngine)
add_subdirectory(./Demo1)

8
Configure.bat Normal file
View File

@ -0,0 +1,8 @@
@REM Run Conan to install dependencies
rmdir build /s /q
@REM DEBUG
conan install . -c tools.cmake.cmaketoolchain:generator=Msbuild -s build_type=Debug --build=missing
@REM RELEASE
conan install . -c tools.cmake.cmaketoolchain:generator=Msbuild -s build_type=Release --build=missing

10
Configure.sh Normal file
View File

@ -0,0 +1,10 @@
#!/bin/bash
# Run Conan to install dependencies
rm -Rf build
# DEBUG
conan install . -s build_type=Debug --build=missing
# RELEASE
conan install . -s build_type=Release --build=missing

View File

@ -14,14 +14,10 @@ on you computer:
Those are wide guideline and any version recent enough of your OS should work
as long it supports vulkan and conan.
### Debug
1. Execute `./debug.sh` (LINUX/MAC) or `.\debug.bat` (WINDOWS)
2. Load CMakeUserPresets.json that was created during step 1
3. You should be able to build the different subprojects
4. The binaries are available in bin/
### Installation step
### Release
1. Execute `./release.sh` (LINUX/MAC) or `.\release.bat` (WINDOWS)
2. Load CMakeUserPresets.json that was created during step 1
3. You should be able to build the different subprojects
4. The binaries are available in bin/
#### Configure your IDE
1. Execute `./Configure.sh` (LINUX/MAC) or `.\Configure.bat` (WINDOWS). This step installs all the dependencies for both release and debug.
2. Load the generated CMakeUserPresets.json that was generated at step 1.
3. Select an executable project (like Demo1)
4. Build

View File

@ -1,2 +0,0 @@
@Run Conan to install dependencies
conan install . -s build_type=Debug --build=missing

View File

@ -1,8 +0,0 @@
#!/bin/bash
# Run Conan to install dependencies
conan install . -s build_type=Debug --build=missing
# Run CMake with the updated CMAKE_PREFIX_PATH
#cmake -DCMAKE_BUILD_TYPE=Debug -S . -B build
#cmake --build build

View File

@ -1,2 +0,0 @@
@ Run Conan to install dependencies
conan install . -s build_type=Release --build=missing

View File

@ -1,8 +0,0 @@
#!/bin/bash
# Run Conan to install dependencies
conan install . -s build_type=Release --build=missing
# Run CMake with the updated CMAKE_PREFIX_PATH
#cmake -DCMAKE_BUILD_TYPE=Release -S . -B build
#cmake --build build