From 62869dc92f760a8d58f01a0afd2e81b6615cf87e Mon Sep 17 00:00:00 2001 From: abhishek1995 Date: Thu, 6 Mar 2014 20:51:09 +0530 Subject: [PATCH 1/2] Update CMakeLists.txt This commit includes checking whether ../data directory (from build directory) and ../../stk-assets directory (from build directory) exists or not. If they don't exist, then it gives error message for the corresponding directory. I have included the code for this on line 320. --- CMakeLists.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index eb544bd66..d73cb16ed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -312,6 +312,18 @@ install(FILES ${PROJECT_BINARY_DIR}/supertuxkart.desktop DESTINATION share/appli install(FILES data/supertuxkart_32.png data/supertuxkart_128.png DESTINATION share/pixmaps) install(FILES data/supertuxkart.appdata DESTINATION share/appdata) +# ==== Checking if data folder exists ==== +if(NOT IS_DIRECTORY data) + message( FATAL_ERROR "${CMAKE_CURRENT_SOURCE_DIR}/data folder doesn't exist" ) +endif() + +# ==== Checking if stk-assets folder exists ==== +if(NOT IS_DIRECTORY ../stk-assets) + set (CUR_DIR ${CMAKE_CURRENT_SOURCE_DIR}) + get_filename_component(PARENT_DIR ${CUR_DIR} PATH) + message( FATAL_ERROR "${PARENT_DIR}/stk-assets folder doesn't exist" ) +endif() + set(PREFIX ${CMAKE_INSTALL_PREFIX}) configure_file(data/supertuxkart_desktop.template supertuxkart.desktop) add_dependencies(supertuxkart supertuxkart.desktop) From 96fe29eb8403b7b59fcc04622f9bbf29eb5f37eb Mon Sep 17 00:00:00 2001 From: abhishek1995 Date: Thu, 6 Mar 2014 21:13:53 +0530 Subject: [PATCH 2/2] Update CMakeLists.txt --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d73cb16ed..83f5827a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -313,12 +313,12 @@ install(FILES data/supertuxkart_32.png data/supertuxkart_128.png DESTINATION sha install(FILES data/supertuxkart.appdata DESTINATION share/appdata) # ==== Checking if data folder exists ==== -if(NOT IS_DIRECTORY data) +if(NOT IS_DIRECTORY ../data) message( FATAL_ERROR "${CMAKE_CURRENT_SOURCE_DIR}/data folder doesn't exist" ) endif() # ==== Checking if stk-assets folder exists ==== -if(NOT IS_DIRECTORY ../stk-assets) +if(NOT IS_DIRECTORY ../../stk-assets) set (CUR_DIR ${CMAKE_CURRENT_SOURCE_DIR}) get_filename_component(PARENT_DIR ${CUR_DIR} PATH) message( FATAL_ERROR "${PARENT_DIR}/stk-assets folder doesn't exist" )