diff options
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4bb6877d9..26441063f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -55,7 +55,7 @@ if(NOT USE_CURL) endif() -option(ENABLE_GETTEXT "Use GetText for internationalization" TRUE) +option(ENABLE_GETTEXT "Use GetText for internationalization" ${BUILD_CLIENT}) set(USE_GETTEXT FALSE) if(ENABLE_GETTEXT) @@ -120,13 +120,13 @@ endif() option(ENABLE_FREETYPE "Enable FreeType2 (TrueType fonts and basic unicode support)" TRUE) set(USE_FREETYPE FALSE) -if(ENABLE_FREETYPE) +if(BUILD_CLIENT AND ENABLE_FREETYPE) find_package(Freetype) if(FREETYPE_FOUND) message(STATUS "Freetype enabled.") set(USE_FREETYPE TRUE) endif() -endif(ENABLE_FREETYPE) +endif() option(ENABLE_CURSES "Enable ncurses console" TRUE) set(USE_CURSES FALSE) @@ -526,8 +526,11 @@ if(USE_CURL) endif() -set(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/bin") - +# When cross-compiling assume the user doesn't want to run the executable anyway, +# otherwise place it in <source dir>/bin/ since Minetest can only run from there. +if(NOT CMAKE_CROSSCOMPILING) + set(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/bin") +endif() if(BUILD_CLIENT) add_executable(${PROJECT_NAME} ${client_SRCS} ${extra_windows_SRCS}) |