Update CMakeLists.txt

Use `PROJECT_SOURCE_DIR` to allow embedding within larger projects. `CMAKE_SOURCE_DIR` is the root of the source tree, where as `PROJECT_SOURCE_DIR` is the directory of the current project.
This commit is contained in:
Saleem Abdulrasool authored and GitHub committed 2024-01-31 18:44:16 -08:00
1 parent 0111e791a1
commit faa65e8842
1 file changed
+1 -1
+1 -1
View File
@@ -11,7 +11,7 @@ cmake_minimum_required(VERSION 3.16)
project(swift-numerics
LANGUAGES Swift)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/modules)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)