  if(MSVC)
     # msvc otherwise is not smart enough and tries to link the scip.exe binary as a library
     setLibProperties(libscip "libscip")
-@@ -960,8 +961,11 @@
+@@ -960,8 +961,12 @@
     setLibProperties(libscip "scip")
  endif()
  
 +target_include_directories(libscip INTERFACE
++    $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>
 +    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
 +    $<INSTALL_INTERFACE:include>)
  target_link_libraries(libscip PRIVATE

 
 set(TPI none CACHE STRING "options for thread support library")  #create the variable
 set_property(CACHE TPI PROPERTY STRINGS none tny omp)  #define list of values GUI will offer for the variable
@@ -206,8 +212,8 @@
 message(STATUS \"Git hash: \" \${GITHASH})
 ")
 add_custom_target(scip_update_githash
-                  COMMAND ${CMAKE_COMMAND} -DDST=${PROJECT_SOURCE_DIR}/src/scip/githash.c
-                                           -P ${CMAKE_BINARY_DIR}/scip_update_githash.cmake)
+  COMMAND ${CMAKE_COMMAND} -DDST=${PROJECT_SOURCE_DIR}/src/scip/githash.c
+                           -P ${CMAKE_BINARY_DIR}/scip_update_githash.cmake)
 
 set(WITH_SCIPDEF on)
 
@@ -221,161 +227,200 @@
 
 # ZLIB
 if(ZLIB)

 
 add_dependencies(libscip scip_update_githash)
 add_dependencies(scip scip_update_githash)
@@ -1012,7 +1025,7 @@
 install(FILES ${dijkstraheaders} DESTINATION include/dijkstra)
 install(FILES ${nlpiheaders} DESTINATION include/nlpi)
 install(FILES ${objscipheaders} DESTINATION include/objscip)
-install(FILES ${scipheaders} ${CMAKE_BINARY_DIR}/scip/config.h ${CMAKE_BINARY_DIR}/scip/scip_export.h DESTINATION include/scip)
+install(FILES ${scipheaders} ${PROJECT_BINARY_DIR}/scip/config.h ${PROJECT_BINARY_DIR}/scip/scip_export.h DESTINATION include/scip)
 install(FILES ${tcliqueheaders} DESTINATION include/tclique)
 install(FILES ${tinycthreadheader} DESTINATION include/tinycthread)
 install(FILES ${tpiheaders} DESTINATION include/tpi)
@@ -1029,7 +1042,7 @@
 
 # Add all targets to the build-tree export set
 export(TARGETS scip libscip
-  FILE "${CMAKE_BINARY_DIR}/scip-targets.cmake")
+  FILE "${PROJECT_BINARY_DIR}/scip-targets.cmake")
 
 #make soplex and zimpl dir absolute for the config file
 if(SOPLEX_NEEDED)
@@ -1041,13 +1054,13 @@
 endif()
 
 #configure the config file for the build tree
-set(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/src" "${CMAKE_BINARY_DIR}")
+set(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/src" "${PROJECT_BINARY_DIR}")
 configure_file(${PROJECT_SOURCE_DIR}/scip-config.cmake.in
-  "${CMAKE_BINARY_DIR}/scip-config.cmake" @ONLY)
+  "${PROJECT_BINARY_DIR}/scip-config.cmake" @ONLY)
 
 include(CMakePackageConfigHelpers)
 write_basic_package_version_file(
-${CMAKE_BINARY_DIR}/scip-config-version.cmake
+  ${PROJECT_BINARY_DIR}/scip-config-version.cmake
     VERSION ${SCIP_VERSION_MAJOR}.${SCIP_VERSION_MINOR}.${SCIP_VERSION_PATCH}
     COMPATIBILITY SameMajorVersion
     )
@@ -1067,5 +1080,5 @@
 # can link easily against scip
 install(EXPORT scip-targets DESTINATION lib/cmake/scip)
 install(FILES "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/scip-config.cmake"
-              ${CMAKE_BINARY_DIR}/scip-config-version.cmake
+  ${PROJECT_BINARY_DIR}/scip-config-version.cmake
         DESTINATION lib/cmake/scip)
