-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from madebr/pr69extra
cmake: build examples on all platforms + no more need for FindNXGL for Nintendo Switch
- Loading branch information
Showing
34 changed files
with
333 additions
and
281 deletions.
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
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
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 |
---|---|---|
|
@@ -6,4 +6,5 @@ | |
/.vs | ||
librw.vcxproj.user | ||
librw.VC.db | ||
librw.VC.VC.opendb | ||
librw.VC.VC.opendb | ||
imgui.ini |
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
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,9 @@ | ||
Build with cmake | ||
================ | ||
|
||
Linux | ||
|
||
mkdir build | ||
cd build | ||
cmake .. -DLIBRW_PLATFORM=GL3 -DLIBRW_GL3_GFXLIB=SDL2 | ||
make |
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
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,37 @@ | ||
if(NOT COMMAND nx_generate_nacp) | ||
message(FATAL_ERROR "The `nx_generate_nacp` cmake command is not available. Please use an appropriate Nintendo Switch toolchain.") | ||
endif() | ||
|
||
if(NOT COMMAND nx_create_nro) | ||
message(FATAL_ERROR "The `nx_create_nro` cmake command is not available. Please use an appropriate Nintendo Switch toolchain.") | ||
endif() | ||
|
||
set(CMAKE_EXECUTABLE_SUFFIX ".elf") | ||
|
||
function(librw_platform_target TARGET) | ||
cmake_parse_arguments(LPT "INSTALL" "" "" ${ARGN}) | ||
|
||
get_target_property(TARGET_TYPE "${TARGET}" TYPE) | ||
if(TARGET_TYPE STREQUAL "EXECUTABLE") | ||
nx_generate_nacp(${TARGET}.nacp | ||
NAME "${TARGET}" | ||
AUTHOR "${librw_AUTHOR}" | ||
VERSION "${librw_VERSION}" | ||
) | ||
|
||
nx_create_nro(${TARGET} | ||
NACP ${TARGET}.nacp | ||
) | ||
|
||
if(LIBRW_INSTALL AND LPT_INSTALL) | ||
get_target_property(TARGET_OUTPUT_NAME ${TARGET} OUTPUT_NAME) | ||
if(NOT TARGET_OUTPUT_NAME) | ||
set(TARGET_OUTPUT_NAME "${TARGET}") | ||
endif() | ||
|
||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${TARGET_OUTPUT_NAME}.nro" | ||
DESTINATION "${CMAKE_INSTALL_BINDIR}" | ||
) | ||
endif() | ||
endif() | ||
endfunction() |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,18 @@ | ||
if(NOT COMMAND add_erl_executable) | ||
message(FATAL_ERROR "The `add_erl_executable` cmake command is not available. Please use an appropriate Playstation 2 toolchain.") | ||
endif() | ||
|
||
function(librw_platform_target TARGET) | ||
cmake_parse_arguments(LPT "INSTALL" "" "" ${ARGN}) | ||
|
||
get_target_property(TARGET_TYPE "${TARGET}" TYPE) | ||
if(TARGET_TYPE STREQUAL "EXECUTABLE") | ||
add_erl_executable(${TARGET} OUTPUT_VAR ERL_FILE) | ||
|
||
if(LIBRW_INSTALL AND LPT_INSTALL) | ||
install(FILES "${ERL_FILE}" | ||
DESTINATION "${CMAKE_INSTALL_BINDIR}" | ||
) | ||
endif() | ||
endif() | ||
endfunction() |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.