Skip to content

Commit

Permalink
Fix to be able to build from dir different than source dir
Browse files Browse the repository at this point in the history
  • Loading branch information
kaeza authored and kwolekr committed Apr 6, 2013
1 parent 120f02e commit 046534e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
19 changes: 12 additions & 7 deletions CMakeLists.txt
Expand Up @@ -167,15 +167,20 @@ endif()

install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/fonts" DESTINATION "${SHAREDIR}")

install(FILES "README.txt" DESTINATION "${DOCDIR}")
install(FILES "doc/lua_api.txt" DESTINATION "${DOCDIR}")
install(FILES "doc/mapformat.txt" DESTINATION "${DOCDIR}")
install(FILES "minetest.conf.example" DESTINATION "${EXAMPLE_CONF_DIR}")
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/README.txt" DESTINATION "${DOCDIR}")
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/doc/lua_api.txt" DESTINATION "${DOCDIR}")
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/doc/mapformat.txt" DESTINATION "${DOCDIR}")
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/minetest.conf.example" DESTINATION "${EXAMPLE_CONF_DIR}")

if(UNIX)
install(FILES "doc/minetest.6" "doc/minetestserver.6" DESTINATION "${MANDIR}/man6")
install(FILES "misc/minetest.desktop" DESTINATION "${XDG_APPS_DIR}")
install(FILES "misc/minetest-icon.svg" DESTINATION "${ICONDIR}/hicolor/scalable/apps")
install(FILES
"${CMAKE_CURRENT_SOURCE_DIR}/doc/minetest.6"
"${CMAKE_CURRENT_SOURCE_DIR}/doc/minetestserver.6"
DESTINATION "${MANDIR}/man6")
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/misc/minetest.desktop"
DESTINATION "${XDG_APPS_DIR}")
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/misc/minetest-icon.svg"
DESTINATION "${ICONDIR}/hicolor/scalable/apps")
endif()

#
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Expand Up @@ -371,7 +371,7 @@ if(USE_CURL)
)
endif(USE_CURL)

set(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/bin")
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}/bin")

if(BUILD_CLIENT)
add_executable(${PROJECT_NAME} ${minetest_SRCS})
Expand Down

1 comment on commit 046534e

@kaeza
Copy link
Contributor Author

@kaeza kaeza commented on 046534e Apr 7, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.