Commit fb1f6986 authored by Guillaume Lozenguez's avatar Guillaume Lozenguez

[CMake] local raylib

parent 07b8a1a2
...@@ -11,14 +11,15 @@ set(CMAKE_CXX_FLAGS_RELEASE_INIT "-Wall") ...@@ -11,14 +11,15 @@ set(CMAKE_CXX_FLAGS_RELEASE_INIT "-Wall")
include_directories(${PROJECT_SOURCE_DIR} ${PROJECT_SOURCE_DIR}/src) include_directories(${PROJECT_SOURCE_DIR} ${PROJECT_SOURCE_DIR}/src)
# RayLib: # RayLib:
find_package(raylib 3.0 REQUIRED) #find_package(raylib 3.0 REQUIRED)
#set(raylib_VERBOSE 1) #set(raylib_VERBOSE 1)
add_executable(nw-hello src/main-hello.c) # Local dependency: (RayLib) :
target_link_libraries(nw-hello raylib m) include_directories( ${PROJECT_SOURCE_DIR}/dpd/include )
link_directories( ${PROJECT_SOURCE_DIR}/dpd )
add_executable(nw-viewer src/main-viewer.c src/networld.c src/controlpanel.c src/entity.c) add_executable(nw-viewer src/main-viewer.c src/networld.c src/controlpanel.c src/entity.c)
target_link_libraries(nw-viewer raylib m) target_link_libraries(nw-viewer raylib pthread dl rt X11 m)
#without cmake package... #without cmake package...
#include_directories(${PROJECT_SOURCE_DIR}/raylib/src) #include_directories(${PROJECT_SOURCE_DIR}/raylib/src)
......
#!/bin/bash
if [ ! -d "build" ];then
mkdir build
fi
cd build
cmake ..
make
# Outputs
cp nw-viewer ..
#!/bin/bash
# Dependencies:
sudo apt update
sudo apt install -y build-essential git cmake
sudo apt install -y libasound2-dev mesa-common-dev \
libx11-dev libxrandr-dev libxi-dev xorg-dev \
libgl1-mesa-dev libglu1-mesa-dev
# Raylib:
git clone https://github.com/raysan5/raylib.git raylib
cd raylib
git checkout '3.0.0'
mkdir build && cd build
cmake -DSHARED=ON -DSTATIC=ON ..
make
sudo make install
cd ..
# NetWorld:
bin/build
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
File added
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment