mirror of
https://github.com/rtlsdrblog/rtl-sdr-blog.git
synced 2025-01-13 11:47:21 +01:00
allow building librtlsdr as CMake subproject
Replace CMAKE_SOURCE_DIR by PROJECT_SOURCE_DIR in main CMakeLists.txt to fix CMake errors when building librtlsdr as a subproject.
This commit is contained in:
parent
43b257854c
commit
bd73737c49
@ -31,7 +31,7 @@ if(NOT CMAKE_BUILD_TYPE)
|
||||
endif(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "")
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
|
||||
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules)
|
||||
|
||||
if(NOT LIB_INSTALL_DIR)
|
||||
set(LIB_INSTALL_DIR lib)
|
||||
@ -80,7 +80,7 @@ endif()
|
||||
# Setup the include and linker paths
|
||||
########################################################################
|
||||
include_directories(
|
||||
${CMAKE_SOURCE_DIR}/include
|
||||
${PROJECT_SOURCE_DIR}/include
|
||||
${LIBUSB_INCLUDE_DIR}
|
||||
${THREADS_PTHREADS_INCLUDE_DIR}
|
||||
)
|
||||
@ -96,7 +96,7 @@ include_directories(
|
||||
# Create uninstall target
|
||||
########################################################################
|
||||
configure_file(
|
||||
${CMAKE_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in
|
||||
${PROJECT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
|
||||
@ONLY)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user