From 36f95294fb87607ffb834c3d2980e8eaa937b1bb Mon Sep 17 00:00:00 2001 From: Seo Youngjin Date: Tue, 23 Mar 2021 17:00:09 +0900 Subject: [PATCH] build sample with cmake on Linux --- README.cmake | 9 +++++++++ tools/CMakeLists.txt | 10 ++++++++++ tools/camera/CMakeLists.txt | 8 ++++++++ tools/im2d/CMakeLists.txt | 8 ++++++++ tools/im3d/CMakeLists.txt | 8 ++++++++ tools/lights/CMakeLists.txt | 8 ++++++++ tools/playground/CMakeLists.txt | 8 ++++++++ tools/ska2anm/CMakeLists.txt | 8 ++++++++ tools/subrast/CMakeLists.txt | 8 ++++++++ 9 files changed, 75 insertions(+) create mode 100644 README.cmake create mode 100644 tools/camera/CMakeLists.txt create mode 100644 tools/im2d/CMakeLists.txt create mode 100644 tools/im3d/CMakeLists.txt create mode 100644 tools/lights/CMakeLists.txt create mode 100644 tools/playground/CMakeLists.txt create mode 100644 tools/ska2anm/CMakeLists.txt create mode 100644 tools/subrast/CMakeLists.txt diff --git a/README.cmake b/README.cmake new file mode 100644 index 0000000..59493b1 --- /dev/null +++ b/README.cmake @@ -0,0 +1,9 @@ +Build with cmake +================ + +Linux + + mkdir build + cd build + cmake .. -DLIBRW_PLATFORM=GL3 -DLIBRW_GL3_GFXLIB=SDL2 + make diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 1d06544..8df1545 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -9,3 +9,13 @@ endif() if(LIBRW_PLATFORM_PS2) add_subdirectory(ps2test) endif() + +if(NOT LIBRW_PLATFORM_PS2) + add_subdirectory(playground) + add_subdirectory(lights) + add_subdirectory(subrast) + add_subdirectory(camera) + add_subdirectory(im2d) + add_subdirectory(im3d) + add_subdirectory(ska2anm) +endif() diff --git a/tools/camera/CMakeLists.txt b/tools/camera/CMakeLists.txt new file mode 100644 index 0000000..83eb04e --- /dev/null +++ b/tools/camera/CMakeLists.txt @@ -0,0 +1,8 @@ +add_executable(camera + main.cpp camexamp.cpp viewer.cpp +) + +target_link_libraries(camera + PUBLIC + librw librw_skeleton librw_skeleton_imgui +) diff --git a/tools/im2d/CMakeLists.txt b/tools/im2d/CMakeLists.txt new file mode 100644 index 0000000..2e72f30 --- /dev/null +++ b/tools/im2d/CMakeLists.txt @@ -0,0 +1,8 @@ +add_executable(im2d + im2d.cpp linelist.cpp main.cpp polyline.cpp trifan.cpp trilist.cpp tristrip.cpp +) + +target_link_libraries(im2d + PUBLIC + librw librw_skeleton librw_skeleton_imgui +) diff --git a/tools/im3d/CMakeLists.txt b/tools/im3d/CMakeLists.txt new file mode 100644 index 0000000..42776c6 --- /dev/null +++ b/tools/im3d/CMakeLists.txt @@ -0,0 +1,8 @@ +add_executable(im3d + im3d.cpp linelist.cpp main.cpp polyline.cpp trifan.cpp trilist.cpp tristrip.cpp +) + +target_link_libraries(im3d + PUBLIC + librw librw_skeleton librw_skeleton_imgui +) diff --git a/tools/lights/CMakeLists.txt b/tools/lights/CMakeLists.txt new file mode 100644 index 0000000..b0a098e --- /dev/null +++ b/tools/lights/CMakeLists.txt @@ -0,0 +1,8 @@ +add_executable(lights + main.cpp lights.cpp +) + +target_link_libraries(lights + PUBLIC + librw librw_skeleton librw_skeleton_imgui +) diff --git a/tools/playground/CMakeLists.txt b/tools/playground/CMakeLists.txt new file mode 100644 index 0000000..cdddf2a --- /dev/null +++ b/tools/playground/CMakeLists.txt @@ -0,0 +1,8 @@ +add_executable(playgound + camera.cpp font.cpp main.cpp ras_test.cpp splines.cpp tl_tests.cpp +) + +target_link_libraries(playgound + PUBLIC + librw librw_skeleton +) diff --git a/tools/ska2anm/CMakeLists.txt b/tools/ska2anm/CMakeLists.txt new file mode 100644 index 0000000..b51751b --- /dev/null +++ b/tools/ska2anm/CMakeLists.txt @@ -0,0 +1,8 @@ +add_executable(ska2anm + ska2anm.cpp +) + +target_link_libraries(ska2anm + PUBLIC + librw +) diff --git a/tools/subrast/CMakeLists.txt b/tools/subrast/CMakeLists.txt new file mode 100644 index 0000000..7941db6 --- /dev/null +++ b/tools/subrast/CMakeLists.txt @@ -0,0 +1,8 @@ +add_executable(subrast + main.cpp subrast.cpp +) + +target_link_libraries(subrast + PUBLIC + librw librw_skeleton librw_skeleton_imgui +)