diff --git a/interpreter/cling/tools/plugins/clad/CMakeLists.txt b/interpreter/cling/tools/plugins/clad/CMakeLists.txt index 4cd9f69f26246..61ee265cb8ca2 100644 --- a/interpreter/cling/tools/plugins/clad/CMakeLists.txt +++ b/interpreter/cling/tools/plugins/clad/CMakeLists.txt @@ -12,16 +12,6 @@ set(clad_install_dir ${CMAKE_BINARY_DIR}/etc/cling/) # Specify include dirs for clad set(CLAD_INCLUDE_DIRS ${clad_install_dir}) # Clad Libraries -set(_CLAD_LIBRARY_PATH ${CMAKE_CURRENT_BINARY_DIR}/clad-prefix/src/clad-build/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}) - -# build byproducts only needed by Ninja -if("${CMAKE_GENERATOR}" STREQUAL "Ninja") - set(CLAD_BYPRODUCTS - ${_CLAD_LIBRARY_PATH}/${CMAKE_STATIC_LIBRARY_PREFIX}cladPlugin${CMAKE_STATIC_LIBRARY_SUFFIX} - ${_CLAD_LIBRARY_PATH}/${CMAKE_STATIC_LIBRARY_PREFIX}cladDifferentiator${CMAKE_STATIC_LIBRARY_SUFFIX} - ) -endif() - set(_clad_build_type ${CMAKE_CFG_INTDIR}) if(MSVC) if (winrtdebug) @@ -30,6 +20,15 @@ if(MSVC) set(_clad_build_type Release) endif() endif(MSVC) +set(_CLAD_LIBRARY_PATH ${CMAKE_CURRENT_BINARY_DIR}/clad-prefix/src/clad-build/${_clad_build_type}/lib${LLVM_LIBDIR_SUFFIX}) + +# build byproducts only needed by Ninja +if("${CMAKE_GENERATOR}" STREQUAL "Ninja") + set(CLAD_BYPRODUCTS + ${_CLAD_LIBRARY_PATH}/${CMAKE_STATIC_LIBRARY_PREFIX}cladPlugin${CMAKE_STATIC_LIBRARY_SUFFIX} + ${_CLAD_LIBRARY_PATH}/${CMAKE_STATIC_LIBRARY_PREFIX}cladDifferentiator${CMAKE_STATIC_LIBRARY_SUFFIX} + ) +endif() if(APPLE) set(_clad_extra_cmake_args -DCMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT})