summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorNils Dagsson Moskopp <nils@dieweltistgarnichtso.net>2011-07-20 18:29:48 +0200
committerNils Dagsson Moskopp <nils@dieweltistgarnichtso.net>2011-07-20 18:29:48 +0200
commit84b85964fac715d03fef7094d2cdcd5945cb0dd2 (patch)
tree04f8e2873abc189aa9c372a0fce30e8b4a00ef47 /src/CMakeLists.txt
parent69937c342cc420d352f6f7f5c6c90383312b76d4 (diff)
parentaf4b532c9e5cec84eb18ec52214636e69c653d87 (diff)
downloadminetest-84b85964fac715d03fef7094d2cdcd5945cb0dd2.tar.gz
minetest-84b85964fac715d03fef7094d2cdcd5945cb0dd2.tar.bz2
minetest-84b85964fac715d03fef7094d2cdcd5945cb0dd2.zip
Merge branch 'master' of github.com:erlehmann/minetest-delta
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index fd1591423..e1de23663 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -43,6 +43,8 @@ else()
find_package(JPEG REQUIRED)
find_package(BZip2 REQUIRED)
find_package(PNG REQUIRED)
+ find_package(Jthread REQUIRED)
+ find_package(Sqlite3 REQUIRED)
if(APPLE)
FIND_LIBRARY(CARBON_LIB Carbon)
FIND_LIBRARY(COCOA_LIB Cocoa)
@@ -143,8 +145,8 @@ include_directories(
${CMAKE_BUILD_TYPE}
${PNG_INCLUDE_DIR}
${GETTEXT_INCLUDE_DIR}
- "${PROJECT_SOURCE_DIR}/jthread"
- "${PROJECT_SOURCE_DIR}/sqlite"
+ ${JTHREAD_INCLUDE_DIR}
+ ${SQLITE3_INCLUDE_DIR}
)
set(EXECUTABLE_OUTPUT_PATH ../bin)
@@ -163,8 +165,8 @@ if(BUILD_CLIENT)
${GETTEXT_LIBRARIES}
${PLATFORM_LIBS}
${CLIENT_PLATFORM_LIBS}
- jthread
- sqlite3
+ ${JTHREAD_LIBRARY}
+ ${SQLITE3_LIBRARY}
)
endif(BUILD_CLIENT)
@@ -174,8 +176,8 @@ if(BUILD_SERVER)
minetestserver
${ZLIB_LIBRARIES}
${PLATFORM_LIBS}
- jthread
- sqlite3
+ ${JTHREAD_LIBRARY}
+ ${SQLITE3_LIBRARY}
)
endif(BUILD_SERVER)
@@ -296,7 +298,14 @@ add_custom_target(translation_de ALL COMMENT "mo update [de]" DEPENDS ${CMAKE_BI
# Subdirectories
-add_subdirectory(jthread)
+if (JTHREAD_FOUND)
+else (JTHREAD_FOUND)
+ add_subdirectory(jthread)
+endif (JTHREAD_FOUND)
+
+if (SQLITE3_FOUND)
+else (SQLITE3_FOUND)
add_subdirectory(sqlite)
+endif (SQLITE3_FOUND)
#end