diff --git a/CMakeLists.txt b/CMakeLists.txt index 71c3a1a6..7ca224fa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,7 +55,7 @@ set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) FetchContent_MakeAvailable(googletest) include(GoogleTest) -add_subdirectory(au) +add_subdirectory(include) # Configure how Au will be installed. # diff --git a/au/CMakeLists.txt b/au/CMakeLists.txt index 7b237dc0..35492412 100644 --- a/au/CMakeLists.txt +++ b/au/CMakeLists.txt @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -include(../cmake/HeaderOnlyLibrary.cmake) +include("${PROJECT_SOURCE_DIR}/cmake/HeaderOnlyLibrary.cmake") # # Publicly exported targets diff --git a/cmake/HeaderOnlyLibrary.cmake b/cmake/HeaderOnlyLibrary.cmake index f30ac651..971e19fa 100644 --- a/cmake/HeaderOnlyLibrary.cmake +++ b/cmake/HeaderOnlyLibrary.cmake @@ -45,7 +45,7 @@ function(header_only_library) ${ARG_NAME} INTERFACE FILE_SET HEADERS - BASE_DIRS ${CMAKE_SOURCE_DIR} + BASE_DIRS "${PROJECT_SOURCE_DIR}/include" FILES ${ARG_HEADERS} ) if (DEFINED ARG_DEPS) @@ -71,6 +71,7 @@ function(header_only_library) TARGETS ${ARG_NAME} EXPORT ${AU_EXPORT_SET_NAME} FILE_SET HEADERS + INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" ) # Add the test, if requested. diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt new file mode 100644 index 00000000..3ca0e0dc --- /dev/null +++ b/include/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(au) diff --git a/include/au b/include/au new file mode 120000 index 00000000..9b388e88 --- /dev/null +++ b/include/au @@ -0,0 +1 @@ +../au/ \ No newline at end of file