diff --git a/CMakeLists.txt b/CMakeLists.txt
index c85be1b..738c6fe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -54,21 +54,6 @@ set(FRUIT_USES_BOOST TRUE CACHE BOOL
         "Whether to use Boost (specifically, boost::unordered_set and boost::unordered_map).
         If this is false, Fruit will use std::unordered_set and std::unordered_map instead (however this causes injection to be a bit slower).")
 
-if(${FRUIT_USES_BOOST})
-
-  if(DEFINED BOOST_DIR)
-    message(DEPRECATION "BOOST_DIR is deprecated. Use Boost_INCLUDE_DIR instead.")
-    set(Boost_INCLUDE_DIR "${BOOST_DIR}" CACHE PATH "")
-  endif()
-
-  find_package(Boost)
-  if(Boost_FOUND)
-    include_directories(${Boost_INCLUDE_DIRS})
-  else()
-    message(FATAL_ERROR "Please re-run CMake, specifying the boost library path as Boost_INCLUDE_DIR, e.g. -DBoost_INCLUDE_DIR=C:\\boost\\boost_1_62_0, or specify -DFRUIT_USES_BOOST=False to not use boost.")
-  endif()
-endif()
-
 set(RUN_TESTS_UNDER_VALGRIND FALSE CACHE BOOL "Whether to run Fruit tests under valgrind")
 if ("${RUN_TESTS_UNDER_VALGRIND}")
   set(RUN_TESTS_UNDER_VALGRIND_FLAG "1")
@@ -77,7 +62,6 @@ endif()
 # Unsafe, only for debugging/benchmarking.
 #set(FRUIT_ADDITIONAL_COMPILE_FLAGS "${FRUIT_ADDITIONAL_COMPILE_FLAGS} -DFRUIT_NO_LOOP_CHECK=1")
 
-add_definitions(${FRUIT_ADDITIONAL_COMPILE_FLAGS})
 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${FRUIT_ADDITIONAL_LINKER_FLAGS}")
 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${FRUIT_ADDITIONAL_LINKER_FLAGS}")
 set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${FRUIT_ADDITIONAL_LINKER_FLAGS}")
@@ -94,8 +78,7 @@ if(${FRUIT_ENABLE_CLANG_TIDY})
     -warnings-as-errors=*;)
 endif()
 
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
-include_directories(${CMAKE_CURRENT_BINARY_DIR}/include)
+set(FRUIT_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/include" "${CMAKE_CURRENT_BINARY_DIR}/include")
 
 # (debug-only) compile switch to get deep template instantiation stacktraces for errors (instead
 # of the user-friendly default that hides Fruit internals).
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 0e328cf..9c75ec6 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -11,16 +11,27 @@ normalized_component_storage_holder.cpp
 semistatic_map.cpp
 semistatic_graph.cpp)
 
-if("${BUILD_SHARED_LIBS}")
+if(BUILD_SHARED_LIBS)
     add_library(fruit SHARED ${FRUIT_SOURCES})
 
-    if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
-        set_target_properties(fruit PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
-    endif()
+    set_target_properties(fruit PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
 else()
     add_library(fruit STATIC ${FRUIT_SOURCES})
 endif()
 
+target_include_directories(fruit
+    PUBLIC
+        ${FRUIT_INCLUDE_DIRS})
+target_compile_options(fruit
+    PUBLIC
+        ${FRUIT_ADDITIONAL_COMPILE_FLAGS})
+
+if(FRUIT_USES_BOOST)
+    target_include_directories(fruit
+        PRIVATE
+            ${CONAN_INCLUDE_DIRS_BOOST})
+endif()
+
 install(TARGETS fruit
         RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
         ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
