-
Notifications
You must be signed in to change notification settings - Fork 542
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[vcpkg.json] Add
allegro5
dep; [CMakeLists.txt] Add BUILD_DEMOS
o…
…ption; [demo/CMakeLists.txt] `add_subdirectory` for each demo (comment out all but `allegro5` for now); [demo/allegro5/CMakeLists.txt] Begin implementing allegro5 demo
- Loading branch information
1 parent
ac7e89a
commit 2396b67
Showing
4 changed files
with
100 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
set(demos | ||
"allegro5" | ||
# "common" | ||
# "d3d11" | ||
# "d3d12" | ||
# "d3d9" | ||
# "gdi" | ||
# "gdip" | ||
# "glfw_opengl2" | ||
# "glfw_opengl3" | ||
# "glfw_opengl4" | ||
# "sdl2surface_rawfb" | ||
# "sdl_opengl2" | ||
# "sdl_opengl3" | ||
# "sdl_opengles2" | ||
# "sdl_renderer" | ||
# "sfml_opengl2" | ||
# "sfml_opengl3" | ||
# "wayland_rawfb" | ||
# "x11" | ||
# "x11_opengl2" | ||
# "x11_opengl3" | ||
# "x11_rawfb" | ||
# "x11_xft" | ||
) | ||
|
||
foreach (demo ${demos}) | ||
add_subdirectory("${demo}") | ||
endforeach (demo ${demos}) |
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,66 @@ | ||
################### | ||
# KeyboardHandler # | ||
################### | ||
#get_filename_component(LIBRARY_NAME "${CMAKE_CURRENT_SOURCE_DIR}" NAME) | ||
#set(LIBRARY_NAME "${PROJECT_NAME}_demo_${LIBRARY_NAME}") | ||
# | ||
#set(Header_Files "KeyboardHandleriOS.h") | ||
#source_group("Header Files" FILES "${Header_Files}") | ||
# | ||
#set(Source_Files "KeyboardHandleriOS.m") | ||
#source_group("Source Files" FILES "${Source_Files}") | ||
# | ||
#add_library("${LIBRARY_NAME}" "${Header_Files}" "${Source_Files}") | ||
#include(GNUInstallDirs) | ||
#target_include_directories( | ||
# "${LIBRARY_NAME}" | ||
# PUBLIC | ||
# "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>" | ||
# "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>" | ||
#) | ||
# | ||
#target_link_libraries( | ||
# "${LIBRARY_NAME}" | ||
# PRIVATE | ||
# "${PROJECT_NAME}_compiler_flags" | ||
#) | ||
# | ||
#set_target_properties("${LIBRARY_NAME}" PROPERTIES LINKER_LANGUAGE C) | ||
|
||
################# | ||
# allegro5 demo # | ||
################# | ||
|
||
get_filename_component(EXEC_NAME "${CMAKE_CURRENT_SOURCE_DIR}" NAME) | ||
set(EXEC_NAME "${PROJECT_NAME}_demo_${EXEC_NAME}") | ||
|
||
set(Header_Files "nuklear_allegro5.h") | ||
source_group("Header Files" FILES "${Header_Files}") | ||
|
||
set(Source_Files "main.c") | ||
source_group("Source Files" FILES "${Source_Files}") | ||
|
||
add_executable("${EXEC_NAME}" "${Header_Files}" "${Source_Files}") | ||
include(GNUInstallDirs) | ||
target_include_directories( | ||
"${EXEC_NAME}" | ||
PUBLIC | ||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>" | ||
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>" | ||
) | ||
|
||
target_link_libraries( | ||
"${EXEC_NAME}" | ||
PRIVATE | ||
"${PROJECT_NAME}_compiler_flags" | ||
) | ||
|
||
find_package(unofficial-allegro5 CONFIG REQUIRED) | ||
target_link_libraries( | ||
"${EXEC_NAME}" | ||
PRIVATE | ||
"unofficial-allegro5::allegro" | ||
"unofficial-allegro5::allegro_ttf" | ||
"unofficial-allegro5::allegro_font" | ||
"unofficial-allegro5::allegro_main" | ||
) |
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