summaryrefslogtreecommitdiffhomepage
path: root/sdk-paths-sthalik@Clang-Linux.cmake
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-10-27 06:58:35 +0100
committerStanislaw Halik <sthalik@misaki.pl>2019-10-27 06:58:35 +0100
commitaaed56e93ddff39159f2d0b08d857a4a01a8184a (patch)
treec90ac2429f9246b27ce262c86b4b7c882b657bf2 /sdk-paths-sthalik@Clang-Linux.cmake
parent62285f807c8b9d260f28b97210703f38ae4cd0f7 (diff)
update my sdk paths
Diffstat (limited to 'sdk-paths-sthalik@Clang-Linux.cmake')
-rw-r--r--sdk-paths-sthalik@Clang-Linux.cmake22
1 files changed, 20 insertions, 2 deletions
diff --git a/sdk-paths-sthalik@Clang-Linux.cmake b/sdk-paths-sthalik@Clang-Linux.cmake
index 0a3c71e8..b72a7a81 100644
--- a/sdk-paths-sthalik@Clang-Linux.cmake
+++ b/sdk-paths-sthalik@Clang-Linux.cmake
@@ -16,16 +16,34 @@ add_compile_options(
)
set(base-flags "-Wall -Wextra -Wpedantic")
-set(CMAKE_C_FLAGS "-std=c11 ${base-flags} -ggdb ${CMAKE_C_FLAGS}")
+
+set(CMAKE_LINKER "ld.lld")
+set(CMAKE_CXX_COMPILER "clang++")
+set(CMAKE_C_COMPILER "clang")
+
+set(CMAKE_C_FLAGS "-std=gnu11 ${base-flags} -ggdb ${CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS "-std=c++17 ${base-flags} -ggdb ${CMAKE_CXX_FLAGS}")
set(opt-flags "-O3 -ffast-math -march=native -flto=thin")
+set(CMAKE_BUILD_TYPE "RELEASE")
set(CMAKE_CXX_FLAGS_RELEASE "${opt-flags} ${CMAKE_CXX_FLAGS_RELEASE}")
set(CMAKE_C_FLAGS_RELEASE "${opt-flags} ${CMAKE_C_FLAGS_RELEASE}")
set(CMAKE_CXX_FLAGS_DEBUG "-ggdb ${CMAKE_CXX_FLAGS_DEBUG}")
set(CMAKE_C_FLAGS_DEBUG "-ggdb ${CMAKE_C_FLAGS_DEBUG}")
-set(CMAKE_LINKER "ld.lld")
+foreach(x EXE MODULE SHARED)
+ set(CMAKE_${x}_LINKER_FLAGS "-fuse-ld=lld ${CMAKE_${x}_LINKER_FLAGS}")
+endforeach()
+
+function(set_sdk var path)
+ set(${var} "$ENV{HOME}/dev/opentrack-depends/${path}" CACHE INTERNAL "" FORCE)
+endfunction()
+
+set_sdk(SDK_ARUCO_LIBPATH "aruco/build/src/libaruco.a")
+set_sdk(SDK_HYDRA "SixenseSDK")
+set_sdk(SDK_VALVE_STEAMVR "steamvr")
+set_sdk(SDK_WINE TRUE)
+set_sdk(SDK_XPLANE "X-Plane-SDK")