Skip to content

Commit

Permalink
Build: Do not manually specify paths.
Browse files Browse the repository at this point in the history
To build, FindLua52.cmake and FindLuabind.cmake must now be findable by
find_package. Also seting some additional environment variables may be
required.
  • Loading branch information
Oberon00 committed Jun 25, 2013
1 parent efa527c commit 82ce6d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 23 deletions.
21 changes: 0 additions & 21 deletions CMakelists.txt
Original file line number Diff line number Diff line change
@@ -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")
6 changes: 4 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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})
Expand All @@ -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})
Expand Down

0 comments on commit 82ce6d5

Please sign in to comment.