diff options
author | fireice-uk <fireice-uk@users.noreply.github.com> | 2018-04-17 23:31:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-17 23:31:25 +0100 |
commit | 601d19610c01e05be5bfec3b735796072f61c56a (patch) | |
tree | 3ae7a39ac53bfc4b9e57ba7030c76817cd1135f9 | |
parent | 54403e8ed6c038c8c25bf2798bedd341a86cf7f5 (diff) | |
parent | a7d77f54d1a4491cace7347aa5213e6393115b42 (diff) | |
download | xmr-stak-601d19610c01e05be5bfec3b735796072f61c56a.zip xmr-stak-601d19610c01e05be5bfec3b735796072f61c56a.tar.gz |
Merge pull request #1447 from psychocrypt/topic-cmakeLibraryOutput
Use EXECUTABLE_OUTPUT_PATH and LIBRARY_OUTPUT_PATH
-rw-r--r-- | CMakeLists.txt | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 15a2684..485616e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -522,8 +522,8 @@ else() add_executable(xmr-stak ${SRCFILES_CPP}) endif() -set(EXECUTABLE_OUTPUT_PATH "bin") -set(LIBRARY_OUTPUT_PATH "bin") +set(EXECUTABLE_OUTPUT_PATH "bin" CACHE STRING "Path to place executables relative to ${CMAKE_INSTALL_PREFIX}") +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) @@ -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 if( NOT CMAKE_INSTALL_PREFIX STREQUAL PROJECT_BINARY_DIR ) install(TARGETS xmr-stak - RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin") + RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/${EXECUTABLE_OUTPUT_PATH}") if(CUDA_FOUND) if(WIN32) install(TARGETS xmrstak_cuda_backend - RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin") + RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/${LIBRARY_OUTPUT_PATH}") else() install(TARGETS xmrstak_cuda_backend - LIBRARY DESTINATION "${CMAKE_INSTALL_PREFIX}/bin") + LIBRARY DESTINATION "${CMAKE_INSTALL_PREFIX}/${LIBRARY_OUTPUT_PATH}") endif() endif() if(OpenCL_FOUND) if(WIN32) install(TARGETS xmrstak_opencl_backend - RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin") + RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/${LIBRARY_OUTPUT_PATH}") else() install(TARGETS xmrstak_opencl_backend - LIBRARY DESTINATION "${CMAKE_INSTALL_PREFIX}/bin") + LIBRARY DESTINATION "${CMAKE_INSTALL_PREFIX}/${LIBRARY_OUTPUT_PATH}") endif() endif() else() |