mirror of
https://github.com/minetest/minetest.git
synced 2024-12-25 07:32:24 +01:00
Merge branch 'master' of github.com:erlehmann/minetest-delta
This commit is contained in:
commit
33e80dae7f
18
cmake/Modules/FindJthread.cmake
Normal file
18
cmake/Modules/FindJthread.cmake
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Look for jthread, use our own if not found
|
||||||
|
|
||||||
|
FIND_PATH(JTHREAD_INCLUDE_DIR jthread.h)
|
||||||
|
|
||||||
|
FIND_LIBRARY(JTHREAD_LIBRARY NAMES jthread)
|
||||||
|
|
||||||
|
IF(JTHREAD_LIBRARY AND JTHREAD_INCLUDE_DIR)
|
||||||
|
SET( JTHREAD_FOUND TRUE )
|
||||||
|
ENDIF(JTHREAD_LIBRARY AND JTHREAD_INCLUDE_DIR)
|
||||||
|
|
||||||
|
IF(JTHREAD_FOUND)
|
||||||
|
MESSAGE(STATUS "Found system jthread header file in ${JTHREAD_INCLUDE_DIR}")
|
||||||
|
MESSAGE(STATUS "Found system jthread library ${JTHREAD_LIBRARY}")
|
||||||
|
ELSE(JTHREAD_FOUND)
|
||||||
|
SET(JTHREAD_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/jthread)
|
||||||
|
SET(JTHREAD_LIBRARY jthread)
|
||||||
|
MESSAGE(STATUS "Using project jthread library")
|
||||||
|
ENDIF(JTHREAD_FOUND)
|
18
cmake/Modules/FindSqlite3.cmake
Normal file
18
cmake/Modules/FindSqlite3.cmake
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Look for sqlite3, use our own if not found
|
||||||
|
|
||||||
|
FIND_PATH(SQLITE3_INCLUDE_DIR sqlite3.h)
|
||||||
|
|
||||||
|
FIND_LIBRARY(SQLITE3_LIBRARY NAMES sqlite3)
|
||||||
|
|
||||||
|
IF(SQLITE3_LIBRARY AND SQLITE3_INCLUDE_DIR)
|
||||||
|
SET( SQLITE3_FOUND TRUE )
|
||||||
|
ENDIF(SQLITE3_LIBRARY AND SQLITE3_INCLUDE_DIR)
|
||||||
|
|
||||||
|
IF(SQLITE3_FOUND)
|
||||||
|
MESSAGE(STATUS "Found system sqlite3 header file in ${SQLITE3_INCLUDE_DIR}")
|
||||||
|
MESSAGE(STATUS "Found system sqlite3 library ${SQLITE3_LIBRARY}")
|
||||||
|
ELSE(SQLITE3_FOUND)
|
||||||
|
SET(SQLITE3_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/sqlite)
|
||||||
|
SET(SQLITE3_LIBRARY sqlite3)
|
||||||
|
MESSAGE(STATUS "Using project sqlite3 library")
|
||||||
|
ENDIF(SQLITE3_FOUND)
|
@ -43,6 +43,8 @@ else()
|
|||||||
find_package(JPEG REQUIRED)
|
find_package(JPEG REQUIRED)
|
||||||
find_package(BZip2 REQUIRED)
|
find_package(BZip2 REQUIRED)
|
||||||
find_package(PNG REQUIRED)
|
find_package(PNG REQUIRED)
|
||||||
|
find_package(Jthread REQUIRED)
|
||||||
|
find_package(Sqlite3 REQUIRED)
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
FIND_LIBRARY(CARBON_LIB Carbon)
|
FIND_LIBRARY(CARBON_LIB Carbon)
|
||||||
FIND_LIBRARY(COCOA_LIB Cocoa)
|
FIND_LIBRARY(COCOA_LIB Cocoa)
|
||||||
@ -143,8 +145,8 @@ include_directories(
|
|||||||
${CMAKE_BUILD_TYPE}
|
${CMAKE_BUILD_TYPE}
|
||||||
${PNG_INCLUDE_DIR}
|
${PNG_INCLUDE_DIR}
|
||||||
${GETTEXT_INCLUDE_DIR}
|
${GETTEXT_INCLUDE_DIR}
|
||||||
"${PROJECT_SOURCE_DIR}/jthread"
|
${JTHREAD_INCLUDE_DIR}
|
||||||
"${PROJECT_SOURCE_DIR}/sqlite"
|
${SQLITE3_INCLUDE_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
set(EXECUTABLE_OUTPUT_PATH ../bin)
|
set(EXECUTABLE_OUTPUT_PATH ../bin)
|
||||||
@ -163,8 +165,8 @@ if(BUILD_CLIENT)
|
|||||||
${GETTEXT_LIBRARIES}
|
${GETTEXT_LIBRARIES}
|
||||||
${PLATFORM_LIBS}
|
${PLATFORM_LIBS}
|
||||||
${CLIENT_PLATFORM_LIBS}
|
${CLIENT_PLATFORM_LIBS}
|
||||||
jthread
|
${JTHREAD_LIBRARY}
|
||||||
sqlite3
|
${SQLITE3_LIBRARY}
|
||||||
)
|
)
|
||||||
endif(BUILD_CLIENT)
|
endif(BUILD_CLIENT)
|
||||||
|
|
||||||
@ -174,8 +176,8 @@ if(BUILD_SERVER)
|
|||||||
minetestserver
|
minetestserver
|
||||||
${ZLIB_LIBRARIES}
|
${ZLIB_LIBRARIES}
|
||||||
${PLATFORM_LIBS}
|
${PLATFORM_LIBS}
|
||||||
jthread
|
${JTHREAD_LIBRARY}
|
||||||
sqlite3
|
${SQLITE3_LIBRARY}
|
||||||
)
|
)
|
||||||
endif(BUILD_SERVER)
|
endif(BUILD_SERVER)
|
||||||
|
|
||||||
@ -296,7 +298,14 @@ add_custom_target(translation_de ALL COMMENT "mo update [de]" DEPENDS ${CMAKE_BI
|
|||||||
|
|
||||||
# Subdirectories
|
# Subdirectories
|
||||||
|
|
||||||
|
if (JTHREAD_FOUND)
|
||||||
|
else (JTHREAD_FOUND)
|
||||||
add_subdirectory(jthread)
|
add_subdirectory(jthread)
|
||||||
|
endif (JTHREAD_FOUND)
|
||||||
|
|
||||||
|
if (SQLITE3_FOUND)
|
||||||
|
else (SQLITE3_FOUND)
|
||||||
add_subdirectory(sqlite)
|
add_subdirectory(sqlite)
|
||||||
|
endif (SQLITE3_FOUND)
|
||||||
|
|
||||||
#end
|
#end
|
||||||
|
@ -1351,6 +1351,9 @@ int main(int argc, char *argv[])
|
|||||||
// Set device in game parameters
|
// Set device in game parameters
|
||||||
device = device;
|
device = device;
|
||||||
|
|
||||||
|
// Set the window caption
|
||||||
|
device->setWindowCaption(L"Minetest [Main Menu]");
|
||||||
|
|
||||||
// Create time getter
|
// Create time getter
|
||||||
g_timegetter = new IrrlichtTimeGetter(device);
|
g_timegetter = new IrrlichtTimeGetter(device);
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#include "porting.h"
|
#include "porting.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
#include "filesys.h"
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
#include "CoreFoundation/CoreFoundation.h"
|
#include "CoreFoundation/CoreFoundation.h"
|
||||||
@ -210,6 +211,11 @@ void initializePaths()
|
|||||||
|
|
||||||
path_data = std::string(buf) + "/../share/" + APPNAME;
|
path_data = std::string(buf) + "/../share/" + APPNAME;
|
||||||
//path_data = std::string(INSTALL_PREFIX) + "/share/" + APPNAME;
|
//path_data = std::string(INSTALL_PREFIX) + "/share/" + APPNAME;
|
||||||
|
if (!fs::PathExists(path_data)) {
|
||||||
|
dstream<<"WARNING: data path " << path_data << " not found!";
|
||||||
|
path_data = std::string(buf) + "/../data";
|
||||||
|
dstream<<" Trying " << path_data << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
path_userdata = std::string(getenv("HOME")) + "/." + APPNAME;
|
path_userdata = std::string(getenv("HOME")) + "/." + APPNAME;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user