From 6818518164def5eaa2a25b992e9707076af1257f Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Sun, 25 Feb 2018 22:02:09 +0100 Subject: Add libtmx dependency --- .gitmodules | 3 +++ CMakeLists.txt | 18 +++++++++++++++--- README.md | 3 +-- lib/libtmx | 1 + 4 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 .gitmodules create mode 160000 lib/libtmx diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..6ee9b0e --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "lib/libtmx"] + path = lib/libtmx + url = git@github.com:kendallemm/libtmx.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 16dd487..0cade19 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,9 @@ endif() project(subconscious) +######################################################################## +# Source Code +######################################################################## # Configuration headers set(subconscious_VERSION_MAJOR 0) set(subconscious_VERSION_MINOR 1) @@ -20,6 +23,9 @@ include_directories("${PROJECT_SOURCE_DIR}/src/main/headers") # sources file(GLOB_RECURSE SOURCES RELATIVE ${CMAKE_SOURCE_DIR} "src/main/cpp/*.cpp") +######################################################################## +# Binary +######################################################################## # executable set(EXECUTABLE_NAME "subconscious") add_executable(${EXECUTABLE_NAME} ${SOURCES}) @@ -33,6 +39,9 @@ if (MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4") endif () +######################################################################## +# Libraies / Dependencies +######################################################################## # SFML library set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules" ${CMAKE_MODULE_PATH}) find_package(SFML 2 REQUIRED network audio graphics window system) @@ -41,14 +50,17 @@ if (SFML_FOUND) target_link_libraries(${EXECUTABLE_NAME} ${SFML_LIBRARIES} ${SFML_DEPENDENCIES}) endif () -# install target -install(TARGETS ${EXECUTABLE_NAME} DESTINATION bin) +# libtmx +add_subdirectory("lib/libtmx/src") +######################################################################## # CPack packaging +######################################################################## +# install target +install(TARGETS ${EXECUTABLE_NAME} DESTINATION bin) include(InstallRequiredSystemLibraries) set(CMAKE_PACKAGE_NAME "subconcious") - set(CPACK_GENERATOR "DEB;ZIP;TGZ;STGZ") # set(CPACK_RESOURCES_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING") diff --git a/README.md b/README.md index 27a8e08..199e4bd 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,8 @@ # Dependencies ## Debian / Ubuntu - ``` -gradle libsfml-dev +gradle libsfml-dev libtinyxml2-dev libboost-filesystem-dev ``` # Build diff --git a/lib/libtmx b/lib/libtmx new file mode 160000 index 0000000..ef45eea --- /dev/null +++ b/lib/libtmx @@ -0,0 +1 @@ +Subproject commit ef45eea94b6883a3b7801d3bfc3f111728bd0336 -- cgit v1.2.1