summaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-06-18 08:45:52 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-06-18 08:45:52 +0200
commit47a512da1e98b88cd96fc761c567cef4eadd376c (patch)
tree5e1562b547dcf0f7ee3aa8fb9a6f387ce665b204 /CMakeLists.txt
parent33287155bdc7e4beefb45ceef0aaaeb4ecb742a7 (diff)
flush
It crashes after drawing a frame for now.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt55
1 files changed, 31 insertions, 24 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 65d6e369..149655e8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -90,20 +90,24 @@ macro(opentrack_library n dir)
opentrack_module(${n} ${dir})
opentrack_qt(${n})
set(link-mode SHARED)
- if (STATIC)
+ if (foolib_STATIC)
set(link-mode STATIC)
endif()
add_library(${n} ${link-mode} ${${n}-all})
target_link_libraries(${n} ${MY_QT_LIBS})
if(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE)
+ set(visibility "-fvisibility=hidden -fvisibility-inlines-hidden")
+ if (foolib_STATIC)
+ set(visibility)
+ endif()
SET_TARGET_PROPERTIES(${n} PROPERTIES
LINK_FLAGS "${foolib_LINK} ${foolib_GNU-LINK} -Wl,--version-script=\"${CMAKE_SOURCE_DIR}/opentrack/${version-script}-version-script.txt\""
- COMPILE_FLAGS "${foolib_COMPILE} ${foolib_GNU-COMPILE} -fvisibility=hidden -fvisibility-inlines-hidden"
+ COMPILE_FLAGS "${foolib_COMPILE} ${foolib_GNU-COMPILE} ${visibility}"
)
else()
set_target_properties(${n} PROPERTIES LINK_FLAGS ${foolib_LINK} COMPILE_FLAGS ${foolib_COMPILE})
endif()
- if (NOT STATIC)
+ if (NOT foolib_STATIC)
install(TARGETS ${n} RUNTIME DESTINATION . LIBRARY DESTINATION .)
endif()
endmacro()
@@ -244,9 +248,8 @@ set_target_properties(opentrack-version PROPERTIES
COMPILE_DEFINITIONS
"IN_VERSION_UNIT;OPENTRACK_VERSION=\"${OPENTRACK__COMMIT}\"")
-opentrack_library(opentrack-filter-accela ftnoir_filter_accela)
-opentrack_library(opentrack-filter-kalman ftnoir_filter_kalman)
-opentrack_library(opentrack-filter-ewma ftnoir_filter_ewma2)
+opentrack_library(opentrack-filter-accela ftnoir_filter_accela STATIC TRUE)
+#opentrack_library(opentrack-filter-ewma ftnoir_filter_ewma2)
opentrack_library(opentrack-proto-fgfs ftnoir_protocol_fg)
@@ -286,16 +289,16 @@ endif()
opentrack_library(opentrack-proto-udp ftnoir_protocol_ftn)
if(WIN32)
- opentrack_library(opentrack-tracker-joystick ftnoir_tracker_joystick)
+ #opentrack_library(opentrack-tracker-joystick ftnoir_tracker_joystick)
endif()
-if(Qt5SerialPort_FOUND)
+if(Qt5SerialPort_FOUND AND FALSE)
opentrack_library(opentrack-tracker-hatire ftnoir_tracker_hatire)
target_link_libraries(opentrack-tracker-hatire ${Qt5SerialPort_LIBRARIES})
target_include_directories(opentrack-tracker-hatire SYSTEM PUBLIC ${Qt5SerialPort_INCLUDE_DIRS})
endif()
-if(SDK_WINE_PREFIX)
+if(SDK_WINE_PREFIX AND FALSE)
opentrack_library(opentrack-proto-wine ftnoir_protocol_wine)
target_link_libraries(opentrack-proto-wine opentrack-compat opentrack-csv)
if(NOT SDK_WINE_NO_WRAPPER)
@@ -319,32 +322,33 @@ if(SDK_WINE_PREFIX)
endif()
endif()
-opentrack_library(opentrack-tracker-udp ftnoir_tracker_udp)
-opentrack_library(opentrack-tracker-freepie-udp ftnoir_tracker_freepie-udp)
+#opentrack_library(opentrack-tracker-udp ftnoir_tracker_udp)
+#opentrack_library(opentrack-tracker-freepie-udp ftnoir_tracker_freepie-udp)
if(OpenCV_FOUND)
- opentrack_library(opentrack-tracker-pt ftnoir_tracker_pt)
+ opentrack_library(opentrack-tracker-pt ftnoir_tracker_pt STATIC YES)
target_link_libraries(opentrack-tracker-pt ${OpenCV_LIBS})
target_include_directories(opentrack-tracker-pt SYSTEM PUBLIC ${OpenCV_INCLUDE_DIRS})
link_with_dinput8(opentrack-tracker-pt)
if(SDK_ARUCO_LIBPATH)
- opentrack_library(opentrack-tracker-aruco ftnoir_tracker_aruco)
- target_link_libraries(opentrack-tracker-aruco ${SDK_ARUCO_LIBPATH} ${OpenCV_LIBS})
- target_include_directories(opentrack-tracker-aruco SYSTEM PUBLIC ${OpenCV_INCLUDE_DIRS})
+ #opentrack_library(opentrack-tracker-aruco ftnoir_tracker_aruco)
+ #target_link_libraries(opentrack-tracker-aruco ${SDK_ARUCO_LIBPATH} ${OpenCV_LIBS})
+ #target_include_directories(opentrack-tracker-aruco SYSTEM PUBLIC ${OpenCV_INCLUDE_DIRS})
endif()
- target_link_libraries(opentrack-filter-kalman ${OpenCV_LIBS})
- target_include_directories(opentrack-filter-kalman SYSTEM PUBLIC ${OpenCV_INCLUDE_DIRS})
+ #opentrack_library(opentrack-filter-kalman ftnoir_filter_kalman)
+ #target_link_libraries(opentrack-filter-kalman ${OpenCV_LIBS})
+ #target_include_directories(opentrack-filter-kalman SYSTEM PUBLIC ${OpenCV_INCLUDE_DIRS})
endif()
-opentrack_library(opentrack-tracker-ht ftnoir_tracker_ht)
-target_link_libraries(opentrack-tracker-ht opentrack-compat)
-link_with_dinput8(opentrack-tracker-ht)
+#opentrack_library(opentrack-tracker-ht ftnoir_tracker_ht)
+#target_link_libraries(opentrack-tracker-ht opentrack-compat)
+#link_with_dinput8(opentrack-tracker-ht)
-link_with_dinput8(opentrack-tracker-joystick)
+#link_with_dinput8(opentrack-tracker-joystick)
-if(SDK_RIFT)
+if(SDK_RIFT AND FALSE)
set(link-flags)
set(c-flags)
if(APPLE)
@@ -366,7 +370,7 @@ if(SDK_RIFT)
endif()
endif()
-if(SDK_HYDRA)
+if(SDK_HYDRA AND FALSE)
opentrack_library(opentrack-tracker-hydra ftnoir_tracker_hydra)
target_include_directories(opentrack-tracker-hydra SYSTEM PUBLIC ${SDK_HYDRA}/include ${SDK_HYDRA}/include/sixense_utils)
if(WIN32)
@@ -428,18 +432,21 @@ else()
endif()
opentrack_module(opentrack facetracknoir)
+
if(UNIX OR APPLE)
list(APPEND opentrack-c qxt-mini/qxtglobalshortcut.h)
endif()
opentrack_qt(opentrack)
add_executable(opentrack ${opentrack-win32-executable} ${opentrack-all})
+target_link_libraries(opentrack opentrack-filter-accela opentrack-tracker-pt)
if(NOT WIN32)
set_target_properties(opentrack PROPERTIES SUFFIX ".bin")
endif()
target_link_libraries(opentrack opentrack-api opentrack-version opentrack-pose-widget opentrack-spline-widget)
-
+target_include_directories(opentrack SYSTEM PUBLIC ${OpenCV_INCLUDE_DIRS})
+target_link_libraries(opentrack ${OpenCV_LIBS})
if(APPLE)
SET_TARGET_PROPERTIES(opentrack-qxt-mini PROPERTIES LINK_FLAGS "-framework Carbon -framework CoreFoundation")