Skip to content
Snippets Groups Projects
Commit 499459bc authored by Felix Weiglhofer's avatar Felix Weiglhofer
Browse files

cmake: Use CMAKE_LIBRARY_OUTPUT_DIRECTORY instead of LIBRARY_OUTPUT_PATH.

Replace usage of deprecated LIBRARY_OUTPUT_PATH variable with newer CMAKE_LIBRARY_OUTPUT_DIRECTORY.
The new variable has the advantage that it populates the LIBRARY_OUTPUT_DIRECTORY property of targets.
This property is required by xpu to figure out where the generated cuda/hip libraries should be placed.
parent 8763bc28
No related branches found
No related tags found
No related merge requests found
......@@ -177,7 +177,7 @@ check_external_stack()
set_compiler_flags()
# Define where the produced targets are placed in the binary directory
Set(LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}/lib")
Set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
Set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin")
Set(INCLUDE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/include")
set(CMAKE_INSTALL_LIBDIR lib)
......
......@@ -228,14 +228,8 @@ macro(generate_cbm_library)
if(LINKDEF)
set(rootmap_file ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}${LIBRARY_NAME}.rootmap)
set(pcm_file ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}${LIBRARY_NAME}_rdict.pcm)
add_custom_command(TARGET ${LIBRARY_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${rootmap_file} ${LIBRARY_OUTPUT_PATH}
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${pcm_file} ${LIBRARY_OUTPUT_PATH}
DEPENDS ${LIBRARY_NAME}
)
set(rootmap_file ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_SHARED_LIBRARY_PREFIX}${LIBRARY_NAME}.rootmap)
set(pcm_file ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_SHARED_LIBRARY_PREFIX}${LIBRARY_NAME}_rdict.pcm)
install(FILES ${rootmap_file} ${pcm_file} DESTINATION lib)
endif(LINKDEF)
......
......@@ -96,7 +96,7 @@ Macro(ROOT_GENERATE_DICTIONARY_NEW)
Set(EXTRA_DICT_PARAMETERS "")
Set(Int_ROOTMAPFILE ${LIBRARY_OUTPUT_PATH}/lib${Int_LIB}.rootmap)
Set(Int_ROOTMAPFILE ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${Int_LIB}.rootmap)
Set(Int_PCMFILE G__${Int_LIB}Dict_rdict.pcm)
Set(OUTPUT_FILES ${OUTPUT_FILES} ${Int_PCMFILE} ${Int_ROOTMAPFILE})
Set(EXTRA_DICT_PARAMETERS ${EXTRA_DICT_PARAMETERS}
......@@ -116,10 +116,10 @@ Macro(ROOT_GENERATE_DICTIONARY_NEW)
Add_Custom_Command(OUTPUT ${OUTPUT_FILES}
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/generate_dictionary_${script_name}.sh
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/${Int_PCMFILE} ${LIBRARY_OUTPUT_PATH}/${Int_PCMFILE}
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/${Int_PCMFILE} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${Int_PCMFILE}
DEPENDS ${HDRS} ${Int_LINKDEF}
)
Install(FILES ${LIBRARY_OUTPUT_PATH}/${Int_PCMFILE} ${Int_ROOTMAPFILE} DESTINATION lib)
Install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${Int_PCMFILE} ${Int_ROOTMAPFILE} DESTINATION lib)
endmacro(ROOT_GENERATE_DICTIONARY_NEW)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment