diff --git a/CMakeLists.txt b/CMakeLists.txt index f73b17ca9..ade0b65d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -262,6 +262,8 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows") ) endif() +# Order of #include-s is very important because of pch.h as its name is the same for all +# projects, the ${PROJECT_SOURCE_DIR}/include must be as the first #include! target_include_directories(${TinyOrm_target} PUBLIC "$" ) diff --git a/drivers/common/CMakeLists.txt b/drivers/common/CMakeLists.txt index 82bcaaf35..0ca7c89c3 100644 --- a/drivers/common/CMakeLists.txt +++ b/drivers/common/CMakeLists.txt @@ -94,12 +94,12 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows") ) endif() +# Order of #include-s is very important because of pch.h as its name is the same for all +# projects, the ${PROJECT_SOURCE_DIR}/include must be as the first #include! target_include_directories(${TinyDrivers_target} - PUBLIC - "$" - "$" - PRIVATE - "$" + PUBLIC "$" + PRIVATE "$" + PUBLIC "$" ) if(BUILD_MYSQL_DRIVER) diff --git a/drivers/mysql/CMakeLists.txt b/drivers/mysql/CMakeLists.txt index 140de5f88..fe68a7dd1 100644 --- a/drivers/mysql/CMakeLists.txt +++ b/drivers/mysql/CMakeLists.txt @@ -82,6 +82,8 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows") ) endif() +# Order of #include-s is very important because of pch.h as its name is the same for all +# projects, the ${PROJECT_SOURCE_DIR}/include must be as the first #include! target_include_directories(${TinyMySql_target} PRIVATE "$"