-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added initial skeleton of project. Including the window creation, build system, opcode parser, basic debugger and UI.
- Loading branch information
1 parent
fd908f6
commit 150d7f3
Showing
10 changed files
with
8,578 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,3 +30,6 @@ | |
*.exe | ||
*.out | ||
*.app | ||
|
||
build* | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
cmake_minimum_required(VERSION 3.11) # FetchContent is available in 3.11+ | ||
project(SkyBoy) | ||
|
||
if (EMSCRIPTEN) | ||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s USE_GLFW=3 -s ASSERTIONS=1 -s WASM=1 -s ASYNCIFY") | ||
set(CMAKE_EXECUTABLE_SUFFIX ".html") # This line is used to set your executable to build with the emscripten html template so taht you can directly open it. | ||
endif () | ||
|
||
# Set this to the minimal version you want to support | ||
find_package(raylib 3.0 QUIET) # Let CMake search for a raylib-config.cmake | ||
|
||
# You could change the QUIET above to REQUIRED and remove this if() clause | ||
# This part downloads raylib and builds it if it's not installed on your system | ||
if (NOT raylib_FOUND) # If there's none, fetch and build raylib | ||
include(FetchContent) | ||
|
||
FetchContent_Declare( | ||
raylib | ||
URL https://github.com/raysan5/raylib/archive/master.tar.gz | ||
) | ||
|
||
FetchContent_GetProperties(raylib) | ||
if (NOT raylib_POPULATED) # Have we downloaded raylib yet? | ||
set(FETCHCONTENT_QUIET NO) | ||
FetchContent_Populate(raylib) | ||
|
||
set(BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) # don't build the supplied examples | ||
|
||
# build raylib | ||
add_subdirectory(${raylib_SOURCE_DIR} ${raylib_BINARY_DIR}) | ||
|
||
endif() | ||
|
||
endif() | ||
|
||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2") | ||
# This is the main part: | ||
|
||
add_executable(${PROJECT_NAME} src/main.c) | ||
#set(raylib_VERBOSE 1) | ||
target_link_libraries(${PROJECT_NAME} raylib) | ||
|
||
# That's it! You should have an example executable that you can run. Have fun! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.