From 4c1018236ce979ddb713440dac2038dfe28c0f79 Mon Sep 17 00:00:00 2001 From: Luca Sas Date: Mon, 14 Sep 2020 10:58:58 +0100 Subject: Update CMakeLists.txt --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6eba3bf..91ef6c9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,5 +9,6 @@ set(BUILD_GAMES OFF CACHE BOOL "" FORCE) # or games add_subdirectory(libs/raylib) -add_executable(raylib_template src/main.c) -target_link_libraries(raylib_template PRIVATE raylib) \ No newline at end of file +add_executable(${CMAKE_PROJECT_NAME} src/main.c) +target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE raylib) +target_compile_definitions(${CMAKE_PROJECT_NAME} PUBLIC ASSET_PATH="${CMAKE_CURRENT_SOURCE_DIR}/assets/") -- cgit v1.2.3 From 2b57b3d884dd42e5faeb8399972ef5e9dc75a840 Mon Sep 17 00:00:00 2001 From: Luca Sas Date: Mon, 14 Sep 2020 11:25:35 +0100 Subject: Update main.c --- src/main.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main.c b/src/main.c index 4fcb802..b8065bd 100644 --- a/src/main.c +++ b/src/main.c @@ -3,9 +3,6 @@ #define SCREEN_WIDTH (800) #define SCREEN_HEIGHT (450) -// Change this depending on the path of your executable relative to the assets folder -#define ASSET_PATH "assets/" - int main(void) { // Initialization @@ -47,4 +44,4 @@ int main(void) CloseWindow(); // Close window and OpenGL context return 0; -} \ No newline at end of file +} -- cgit v1.2.3