mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
50 lines
1.8 KiB
Diff
50 lines
1.8 KiB
Diff
|
diff -ruN a/CMakeLists.txt b/CMakeLists.txt
|
||
|
--- a/CMakeLists.txt 2019-04-15 06:05:59.000000000 +0200
|
||
|
+++ b/CMakeLists.txt 2019-04-16 21:01:48.285475235 +0200
|
||
|
@@ -11,23 +11,32 @@
|
||
|
endif()
|
||
|
|
||
|
#Include RTOSC
|
||
|
-if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rtosc/CMakeLists.txt")
|
||
|
- message(STATUS "RTOSC NOT FOUND")
|
||
|
- message(STATUS "Attempting to checkout submodule")
|
||
|
- find_package(Git REQUIRED)
|
||
|
- execute_process(COMMAND git submodule update --init)
|
||
|
+find_package(PkgConfig)
|
||
|
+set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH TRUE)
|
||
|
+pkg_check_modules(RTOSC REQUIRED librtosc )
|
||
|
+if(RTOSC_FOUND)
|
||
|
+ message(STATUS "Found Rtosc system package...")
|
||
|
+ message(STATUS "Including from: ${RTOSC_INCLUDE_DIR}")
|
||
|
+ include_directories(${RTOSC_INCLUDE_DIR})
|
||
|
+else()
|
||
|
if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rtosc/CMakeLists.txt")
|
||
|
- message(FATAL_ERROR "FAILED TO CHECKOUT RTOSC\n"
|
||
|
- "please check file permissions and your network")
|
||
|
+ message(STATUS "RTOSC NOT FOUND")
|
||
|
+ message(STATUS "Attempting to checkout submodule")
|
||
|
+ find_package(Git REQUIRED)
|
||
|
+ execute_process(COMMAND git submodule update --init)
|
||
|
+ if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rtosc/CMakeLists.txt")
|
||
|
+ message(FATAL_ERROR "FAILED TO CHECKOUT RTOSC\n"
|
||
|
+ "please check file permissions and your network")
|
||
|
+ endif()
|
||
|
+ else()
|
||
|
+ message(STATUS "Found Rtosc Submodule...")
|
||
|
endif()
|
||
|
-else()
|
||
|
- message(STATUS "Found Rtosc Submodule...")
|
||
|
+ set(RTOSC_NO_INSTALL TRUE)
|
||
|
+ include("rtosc/cmake/ColorMessage.cmake")
|
||
|
+ add_subdirectory(rtosc)
|
||
|
+ include_directories(rtosc/include)
|
||
|
endif()
|
||
|
|
||
|
-set(RTOSC_NO_INSTALL TRUE)
|
||
|
-include("rtosc/cmake/ColorMessage.cmake")
|
||
|
-add_subdirectory(rtosc)
|
||
|
-include_directories(rtosc/include)
|
||
|
|
||
|
enable_testing()
|
||
|
include(CTestConfig.cmake)
|