From 82ce6d59632a0205cabf95437a5b1a3e5c95e666 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Neum=C3=BCller?= Date: Mon, 24 Jun 2013 19:21:00 +0200 Subject: [PATCH] Build: Do not manually specify paths. To build, FindLua52.cmake and FindLuabind.cmake must now be findable by find_package. Also seting some additional environment variables may be required. --- CMakelists.txt | 21 --------------------- src/CMakeLists.txt | 6 ++++-- 2 files changed, 4 insertions(+), 23 deletions(-) diff --git a/CMakelists.txt b/CMakelists.txt index 8b3c8f6..072ed32 100644 --- a/CMakelists.txt +++ b/CMakelists.txt @@ -1,26 +1,5 @@ cmake_minimum_required(VERSION 2.6) project(JadeEngine) -# Adjust to actual locations and comment in if necessary -if (WIN32) - #set (SFML_ROOT "C:/myProgs/cpp/Bibliotheken/SFML-2/install") - set (ENV{PHYSFSDIR} "C:/Program Files (x86)/PhysicsFS") - set (ENV{BOOST_ROOT} "C:/myProgs/cpp/Bibliotheken/boost_1_53_0") - set (LUA_DIR "C:/myProgs/cpp/Bibliotheken/lua-5.2.0") - set (LUABIND_DIR "C:/myProgs/cpp/Projekte/luabind") - set (LUA_INCLUDE_DIR "${LUA_DIR}/src") - set (LUA_LIBRARY - optimized "${LUA_DIR}/build11/RelWithDebInfo/lua52.lib" - debug "${LUA_DIR}/build11/Debug/lua52-d.lib") - set (LUABIND_INCLUDE_DIR "${LUABIND_DIR}") - set (LUABIND_LIBRARY - optimized "${LUABIND_DIR}/build/src/Release/luabind09.lib" - debug "${LUABIND_DIR}/build/src/Debug/luabind09-d.lib") -else () - set(LUABIND_LIBRARY - optimized "libluabind09.a" - debug "libluabind09-d.a") - find_package(Lua52 REQUIRED) -endif() add_subdirectory("src") add_subdirectory("base.jd") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9451856..5ef67d2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -206,6 +206,8 @@ else () endif () find_package(PhysFS REQUIRED) find_package(ZLIB REQUIRED) +find_package(Lua52 REQUIRED) +find_package(Luabind REQUIRED) set(Boost_USE_STATIC_LIBS ON) set(Boost_USE_MULTITHREADED ON) set(Boost_USE_STATIC_RUNTIME OFF) @@ -217,7 +219,7 @@ include_directories( "${CMAKE_SOURCE_DIR}/src" ${SFML_INCLUDE_DIR} ${LUA_INCLUDE_DIR} - ${LUABIND_INCLUDE_DIR} + ${LUABIND_INCLUDE_DIRS} ${PHYSFS_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} ${Boost_INCLUDE_DIRS}) @@ -226,7 +228,7 @@ set_target_properties(jd PROPERTIES COMPILE_DEFINITIONS "${COMP_DEFS}") target_link_libraries(jd ${SFML_LIBRARIES} ${LUA_LIBRARY} - ${LUABIND_LIBRARY} + ${LUABIND_LIBRARIES} ${PHYSFS_LIBRARY} ${ZLIB_LIBRARY} ${Boost_LIBRARIES})