From 9b127fc0a349972b1312866766f288534b1d47e4 Mon Sep 17 00:00:00 2001 From: Didier Raboud Date: Fri, 14 Dec 2012 15:47:46 +0100 Subject: Add FindLTDL cmake module As mentionned in FindLTDL.cmake, this is code that is hereby relicensed under GPLv3. closes #68 --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 660c79f..022302a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,6 +42,7 @@ find_package(SDL 1.2.10 REQUIRED) find_package(SDL_image 1.2 REQUIRED) find_package(SDL_ttf 2.0 REQUIRED) find_package(PNG 1.2 REQUIRED) +find_package(LTDL 2.4.2 REQUIRED) set(Boost_USE_STATIC_LIBS ON) set(Boost_USE_MULTITHREADED ON) -- cgit v1.2.3-1-g7c22 From e504fe1bb52137bdf34cd5ec9146913fb3d0c135 Mon Sep 17 00:00:00 2001 From: Didier Raboud Date: Fri, 14 Dec 2012 16:10:03 +0100 Subject: Use system-provided Google test library. This avoids library duplication, in favour of a shared (source) library: libgtest-dev is available at least on Debian, Ubuntu, Gentoo, Fedora, at the time of committing. If the library is not found in system paths, a copy of it in lib/gtest can work too. --- CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 660c79f..6e9e969 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,8 +125,12 @@ endif() if(${TESTS}) # Google Test library - set(GTEST_DIR "${colobot_SOURCE_DIR}/lib/gtest") - add_subdirectory(lib/gtest bin/test) + find_path(GTEST_SRC_DIR src/gtest.cc PATHS /usr/src/ PATH_SUFFIXES gtest) + if(GTEST_SRC_DIR) + add_subdirectory(${GTEST_SRC_DIR} bin/test) + else(GTEST_SRC_DIR) + add_subdirectory(lib/gtest bin/test) + endif(GTEST_SRC_DIR) endif() # Subdirectory with sources -- cgit v1.2.3-1-g7c22 From a4cf777fb8cb939db10998853fc9e40deb64aa8d Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Fri, 14 Dec 2012 21:42:43 +0100 Subject: Reverted lib/, fixed gtest path in CMakeLists.txt Some gtest system packages use name gtest-all.cc. lib/ directory should be left in repository. --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a925e8..1ec7297 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -126,12 +126,12 @@ endif() if(${TESTS}) # Google Test library - find_path(GTEST_SRC_DIR src/gtest.cc PATHS /usr/src/ PATH_SUFFIXES gtest) + find_path(GTEST_SRC_DIR NAMES src/gtest.cc src/gtest-all.cc PATHS /usr/src/ PATH_SUFFIXES gtest) if(GTEST_SRC_DIR) add_subdirectory(${GTEST_SRC_DIR} bin/test) - else(GTEST_SRC_DIR) + else() add_subdirectory(lib/gtest bin/test) - endif(GTEST_SRC_DIR) + endif() endif() # Subdirectory with sources -- cgit v1.2.3-1-g7c22