Skip to content
Snippets Groups Projects
Unverified Commit 601d1961 authored by fireice-uk's avatar fireice-uk Committed by GitHub
Browse files

Merge pull request #1447 from psychocrypt/topic-cmakeLibraryOutput

Use EXECUTABLE_OUTPUT_PATH and LIBRARY_OUTPUT_PATH
parents 54403e8e a7d77f54
No related branches found
No related tags found
No related merge requests found
...@@ -522,8 +522,8 @@ else() ...@@ -522,8 +522,8 @@ else()
add_executable(xmr-stak ${SRCFILES_CPP}) add_executable(xmr-stak ${SRCFILES_CPP})
endif() endif()
set(EXECUTABLE_OUTPUT_PATH "bin") set(EXECUTABLE_OUTPUT_PATH "bin" CACHE STRING "Path to place executables relative to ${CMAKE_INSTALL_PREFIX}")
set(LIBRARY_OUTPUT_PATH "bin") set(LIBRARY_OUTPUT_PATH "bin" CACHE STRING "Path to place libraries relative to ${CMAKE_INSTALL_PREFIX}")
target_link_libraries(xmr-stak ${LIBS} xmr-stak-c xmr-stak-backend) target_link_libraries(xmr-stak ${LIBS} xmr-stak-c xmr-stak-backend)
...@@ -535,23 +535,23 @@ target_link_libraries(xmr-stak ${LIBS} xmr-stak-c xmr-stak-backend) ...@@ -535,23 +535,23 @@ target_link_libraries(xmr-stak ${LIBS} xmr-stak-c xmr-stak-backend)
# do not install the binary if the project and install are equal # do not install the binary if the project and install are equal
if( NOT CMAKE_INSTALL_PREFIX STREQUAL PROJECT_BINARY_DIR ) if( NOT CMAKE_INSTALL_PREFIX STREQUAL PROJECT_BINARY_DIR )
install(TARGETS xmr-stak install(TARGETS xmr-stak
RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin") RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/${EXECUTABLE_OUTPUT_PATH}")
if(CUDA_FOUND) if(CUDA_FOUND)
if(WIN32) if(WIN32)
install(TARGETS xmrstak_cuda_backend install(TARGETS xmrstak_cuda_backend
RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin") RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/${LIBRARY_OUTPUT_PATH}")
else() else()
install(TARGETS xmrstak_cuda_backend install(TARGETS xmrstak_cuda_backend
LIBRARY DESTINATION "${CMAKE_INSTALL_PREFIX}/bin") LIBRARY DESTINATION "${CMAKE_INSTALL_PREFIX}/${LIBRARY_OUTPUT_PATH}")
endif() endif()
endif() endif()
if(OpenCL_FOUND) if(OpenCL_FOUND)
if(WIN32) if(WIN32)
install(TARGETS xmrstak_opencl_backend install(TARGETS xmrstak_opencl_backend
RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin") RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/${LIBRARY_OUTPUT_PATH}")
else() else()
install(TARGETS xmrstak_opencl_backend install(TARGETS xmrstak_opencl_backend
LIBRARY DESTINATION "${CMAKE_INSTALL_PREFIX}/bin") LIBRARY DESTINATION "${CMAKE_INSTALL_PREFIX}/${LIBRARY_OUTPUT_PATH}")
endif() endif()
endif() endif()
else() else()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment