2012-08-22 15:22:01 +02:00
|
|
|
project(LikesTV_API C CXX)
|
|
|
|
cmake_minimum_required(VERSION 2.6)
|
|
|
|
cmake_policy(SET CMP0003 NEW)
|
|
|
|
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
|
|
|
|
|
2012-08-23 12:55:31 +02:00
|
|
|
if(CMAKE_COMPILER_IS_GNUCXX)
|
|
|
|
set(CMAKE_CXX_FLAGS_RELEASE "-std=c++0x -Wall -DNDEBUG")
|
|
|
|
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -std=c++0x -Wall -Wextra -DDEBUG")
|
|
|
|
endif(CMAKE_COMPILER_IS_GNUCXX)
|
|
|
|
|
|
|
|
|
2012-08-22 15:31:26 +02:00
|
|
|
find_package(PkgConfig)
|
2012-08-23 14:21:34 +02:00
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
|
2012-08-22 15:31:26 +02:00
|
|
|
pkg_check_modules(PC_LIBSQLITE QUIET sqlite3)
|
|
|
|
set(LIBSQLITE3_DEFINITIONS ${PC_LIBSQLITE_CFLAGS_OTHER})
|
|
|
|
|
|
|
|
find_path(LIBSQLITE3_INCLUDE_DIR sqlite3.h HINTS ${PC_LIBSQLITE_INCLUDEDIR} ${PC_LIBSQLITE_INCLUDE_DIRS} PATH_SUFFIXES libsqlite3)
|
|
|
|
find_library(LIBSQLITE3_LIBRARY NAMES sqlite3 libsqlite3 HINTS ${PC_LIBSQLITE_LIBDIR} ${PC_LIBSQLITE_LIBRARY_DIRS})
|
|
|
|
|
|
|
|
set(LIBSQLITE3_LIBRARIES ${LIBSQLITE3_LIBRARY} )
|
|
|
|
set(LIBSQLITE3_INCLUDE_DIRS ${LIBSQLITE3_INCLUDE_DIR} )
|
|
|
|
|
|
|
|
find_package_handle_standard_args(LibSqlite3 DEFAULT_MSG LIBSQLITE3_LIBRARY LIBSQLITE3_INCLUDE_DIR)
|
|
|
|
|
|
|
|
mark_as_advanced(LIBSQLITE3_INCLUDE_DIR LIBSQLITE3_LIBRARY )
|
|
|
|
|
2012-08-25 16:35:12 +02:00
|
|
|
find_package(Boost COMPONENTS system filesystem)
|
2012-08-22 15:22:01 +02:00
|
|
|
|
|
|
|
include_directories(
|
|
|
|
"${PROJECT_BINARY_DIR}"
|
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR}"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}"
|
2012-08-22 15:31:26 +02:00
|
|
|
${LIBSQLITE3_INCLUDE_DIRS}
|
2012-08-25 16:29:41 +02:00
|
|
|
${Boost_INCLUDE_DIRS}
|
2012-08-22 15:22:01 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
set(mapper_HDRS
|
2012-08-25 13:19:58 +02:00
|
|
|
PixelAttributes.h
|
2012-08-23 12:46:22 +02:00
|
|
|
TileGenerator.h
|
2012-08-22 15:22:01 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
set(mapper_SRCS
|
|
|
|
mapper.cpp
|
2012-08-25 13:19:58 +02:00
|
|
|
PixelAttributes.cpp
|
2012-08-23 12:46:22 +02:00
|
|
|
TileGenerator.cpp
|
2012-08-22 15:22:01 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
add_executable(minetest_mapper
|
|
|
|
${mapper_HDRS}
|
|
|
|
${mapper_SRCS}
|
|
|
|
)
|
2012-08-22 15:31:26 +02:00
|
|
|
|
|
|
|
target_link_libraries(
|
|
|
|
minetest_mapper
|
|
|
|
${LIBSQLITE3_LIBRARIES}
|
2012-08-25 16:29:41 +02:00
|
|
|
${Boost_LIBRARIES}
|
2012-08-23 14:21:34 +02:00
|
|
|
gd
|
2012-08-24 11:49:42 +02:00
|
|
|
z
|
2012-08-22 15:31:26 +02:00
|
|
|
)
|