dev/beber/build: improve install target (#150)

* build: remove hardcoded lib/ destination

cmake internally has a logic to know where is the best place to install
a given library. For example on amd64 it does not make sense to install
the library in /usr/lib, this change allow the library to the installed
in /usr/lib64

* build: mark src/randomx.h as a public header

this allow src/randomx.h to be installed in /usr/include/randomx.h
automagically during make install
This commit is contained in:
Bertrand Jacquin 2019-11-15 11:55:11 +00:00 committed by tevador
parent 7567cef4c6
commit 66c039030f

View file

@ -157,9 +157,10 @@ add_library(randomx
set_property(TARGET randomx PROPERTY POSITION_INDEPENDENT_CODE ON) set_property(TARGET randomx PROPERTY POSITION_INDEPENDENT_CODE ON)
set_property(TARGET randomx PROPERTY CXX_STANDARD 11) set_property(TARGET randomx PROPERTY CXX_STANDARD 11)
set_property(TARGET randomx PROPERTY CXX_STANDARD_REQUIRED ON) set_property(TARGET randomx PROPERTY CXX_STANDARD_REQUIRED ON)
set_property(TARGET randomx PROPERTY PUBLIC_HEADER src/randomx.h)
install(TARGETS randomx install(TARGETS randomx
ARCHIVE DESTINATION lib LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION lib) ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
add_executable(randomx-tests add_executable(randomx-tests
src/tests/tests.cpp) src/tests/tests.cpp)