diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2017-03-27 01:35:34 +0200 | 
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-03-27 02:23:32 +0200 | 
| commit | 9deb6dafac0877423abe38eab887d11ea80ef548 (patch) | |
| tree | b347e85dee32faab599653d283e51efead93e0df | |
| parent | 9921018749d91d4d3c3063347dc40b882f8f6634 (diff) | |
cmake: rename project's function prefix
It's not annoying having to type it anymore. Also
"otr_boilerplate" -> "otr_module".
53 files changed, 175 insertions, 178 deletions
| diff --git a/CMakeLists.txt b/CMakeLists.txt index 276a5cae..9f519ebb 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,7 @@  # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR  # OTHER DEALINGS IN THE SOFTWARE. -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/) +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")  include(opentrack-check-build-directory)  include(opentrack-build) diff --git a/api/CMakeLists.txt b/api/CMakeLists.txt index 0be2c242..a181abb9 100644 --- a/api/CMakeLists.txt +++ b/api/CMakeLists.txt @@ -1,3 +1,3 @@ -opentrack_boilerplate(opentrack-api NO-COMPAT BIN) +otr_module(api NO-COMPAT BIN)  target_link_libraries(opentrack-api opentrack-options opentrack-compat)  target_include_directories(opentrack-api PUBLIC ${CMAKE_BINARY_DIR}) diff --git a/api/plugin-support.hpp b/api/plugin-support.hpp index d8a5ec8a..86994d18 100644 --- a/api/plugin-support.hpp +++ b/api/plugin-support.hpp @@ -41,7 +41,7 @@  #ifdef _MSC_VER  #   define OPENTRACK_SOLIB_PREFIX ""  #else -#   define OPENTRACK_SOLIB_PREFIX "lib" +#   define OPENTRACK_SOLIB_PREFIX ""  #endif  extern "C" typedef void* (*OPENTRACK_CTOR_FUNPTR)(void); diff --git a/cmake/opentrack-boilerplate.cmake b/cmake/opentrack-boilerplate.cmake index 32829279..5661e151 100644 --- a/cmake/opentrack-boilerplate.cmake +++ b/cmake/opentrack-boilerplate.cmake @@ -19,14 +19,14 @@ set(new-hier-path "#pragma once  set(hier-path-filename "${CMAKE_BINARY_DIR}/opentrack-library-path.h")  set(orig-hier-path "") -if(EXISTS ${hier-path-filename}) +if(EXISTS "${hier-path-filename}")      file(READ ${hier-path-filename} orig-hier-path)  endif()  if(NOT (orig-hier-path STREQUAL new-hier-path)) -    file(WRITE ${hier-path-filename} "${new-hier-path}") +    file(WRITE "${hier-path-filename}" "${new-hier-path}")  endif() -function(opentrack_glob_sources var) +function(otr_glob_sources var)      set(dir "${CMAKE_CURRENT_SOURCE_DIR}")      file(GLOB ${var}-c ${dir}/*.cpp ${dir}/*.c ${dir}/*.h ${dir}/*.hpp)      file(GLOB ${var}-res ${dir}/*.rc) @@ -41,7 +41,7 @@ function(opentrack_glob_sources var)      endforeach()  endfunction() -function(opentrack_qt n) +function(otr_qt n)      qt5_wrap_cpp(${n}-moc ${${n}-c} OPTIONS --no-notes)      qt5_wrap_ui(${n}-uih ${${n}-ui})      qt5_add_resources(${n}-rcc ${${n}-rc}) @@ -52,7 +52,7 @@ function(opentrack_qt n)      set(${n}-all "${${n}-all}" PARENT_SCOPE)  endfunction() -function(opentrack_fixup_subsystem n) +function(otr_fixup_subsystem n)      if(MSVC)          if(SDK_CONSOLE_DEBUG)              set(subsystem CONSOLE) @@ -69,19 +69,19 @@ function(opentrack_fixup_subsystem n)      endif()  endfunction() -function(opentrack_compat target) +function(otr_compat target)      if(NOT MSVC)          set_property(SOURCE ${${target}-moc} APPEND_STRING PROPERTY COMPILE_FLAGS "-w -Wno-error")      endif()      if(WIN32)          target_link_libraries(${target} dinput8 dxguid strmiids)      endif() -    opentrack_fixup_subsystem(${target}) +    otr_fixup_subsystem(${target})  endfunction()  include(CMakeParseArguments) -function(opentrack_is_target_c_only ret srcs) +function(otr_is_target_c_only ret srcs)      set(val TRUE)      foreach(i ${srcs})          get_filename_component(ext "${i}" EXT) @@ -94,14 +94,14 @@ function(opentrack_is_target_c_only ret srcs)      set(${ret} "${val}" PARENT_SCOPE)  endfunction() -function(opentrack_install_pdb_current_project) +function(otr_install_pdb_current_project)      if(MSVC AND FALSE)          file(GLOB_RECURSE pdbs "${CMAKE_CURRENT_BINARY_DIR}/*.pdb")          install(FILES ${pdbs} DESTINATION "${subdir}" ${opentrack-perms})      endif()  endfunction() -function(opentrack_boilerplate n) +function(otr_module n)      message(STATUS "module ${n}")      cmake_parse_arguments(arg          "STATIC;NO-COMPAT;BIN;EXECUTABLE;NO-QT;WIN32-CONSOLE;NO-INSTALL" @@ -110,14 +110,16 @@ function(opentrack_boilerplate n)          ${ARGN}          )      if(NOT "${arg_UNPARSED_ARGUMENTS}" STREQUAL "") -        message(FATAL_ERROR "opentrack_boilerplate bad formals: ${arg_UNPARSED_ARGUMENTS}") +        message(FATAL_ERROR "otr_module bad formals: ${arg_UNPARSED_ARGUMENTS}")      endif() +    set(n "opentrack-${n}") +      project(${n}) -    opentrack_glob_sources(${n}) -    opentrack_is_target_c_only(is-c-only "${${n}-all}") +    otr_glob_sources(${n}) +    otr_is_target_c_only(is-c-only "${${n}-all}")      if(NOT (is-c-only OR arg_NO-QT)) -        opentrack_qt(${n}) +        otr_qt(${n})      else()          set(arg_NO-QT TRUE)      endif() @@ -148,6 +150,7 @@ function(opentrack_boilerplate n)          endif()          add_library(${n} ${link-mode} "${${n}-all}")      endif() +    set_property(TARGET ${n} PROPERTY PREFIX "")      if(NOT arg_NO-QT)          target_link_libraries(${n} ${MY_QT_LIBS}) @@ -157,7 +160,7 @@ function(opentrack_boilerplate n)          target_link_libraries(${n} opentrack-api opentrack-options opentrack-compat)      endif() -    opentrack_compat(${n}) +    otr_compat(${n})      if(CMAKE_COMPILER_IS_GNUCXX)          set(c-props "-fvisibility=hidden") @@ -186,7 +189,7 @@ function(opentrack_boilerplate n)                  set(subdir "${opentrack-hier-pfx}")                  install(TARGETS "${n}" ${opentrack-hier-str} ${opentrack-perms})              endif() -            opentrack_install_pdb_current_project() +            otr_install_pdb_current_project()          endif()      endif() diff --git a/cmake/opentrack-hier.cmake b/cmake/opentrack-hier.cmake index a892311c..905625fb 100644 --- a/cmake/opentrack-hier.cmake +++ b/cmake/opentrack-hier.cmake @@ -7,59 +7,56 @@  # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  # PERFORMANCE OF THIS SOFTWARE.
 -if(NOT opentrack-hier-included)
 -    set(opentrack-hier-included TRUE)
 -    set(opentrack-install-rpath "")
 -    if(APPLE)
 -        set(opentrack-hier-pfx ".")
 -        set(opentrack-hier-path "/")
 -        set(opentrack-hier-doc "/")
 -        set(opentrack-hier-str RUNTIME DESTINATION . LIBRARY DESTINATION .)
 -        set(opentrack-doc-pfx "./doc")
 -        set(opentrack-doc-src-pfx "./source-code")
 -        set(opentrack-i18n-pfx "./i18n")
 -        set(opentrack-i18n-path "./i18n")
 -    elseif(WIN32)
 -        set(opentrack-hier-pfx "./modules")
 -        set(opentrack-hier-path "/modules/")
 -        set(opentrack-hier-doc "/doc/")
 -        set(opentrack-doc-pfx "./doc")
 -        set(opentrack-doc-src-pfx "./source-code")
 -        set(opentrack-hier-str RUNTIME DESTINATION ./modules/ LIBRARY DESTINATION ./modules/)
 -        set(opentrack-i18n-pfx "./i18n")
 -        set(opentrack-i18n-path "./i18n")
 -    else()
 -        set(opentrack-hier-pfx "libexec/opentrack")
 -        set(opentrack-hier-path "/../libexec/opentrack/")
 -        set(opentrack-hier-doc "/share/doc/opentrack/")
 -        set(opentrack-doc-pfx "./share/doc/opentrack")
 -        set(opentrack-doc-src-pfx "./share/doc/opentrack/source-code")
 -        set(opentrack-install-rpath "${CMAKE_INSTALL_PREFIX}/${opentrack-hier-pfx}")
 -        set(opentrack-hier-str ARCHIVE DESTINATION lib/opentrack LIBRARY DESTINATION ${opentrack-hier-pfx} RUNTIME DESTINATION bin)
 -        set(opentrack-i18n-pfx "./libexec/opentrack/i18n")
 -        set(opentrack-i18n-path "../libexec/opentrack/i18n")
 -    endif()
 +set(opentrack-install-rpath "")
 +if(APPLE)
 +    set(opentrack-hier-pfx ".")
 +    set(opentrack-hier-path "/")
 +    set(opentrack-hier-doc "/")
 +    set(opentrack-hier-str RUNTIME DESTINATION . LIBRARY DESTINATION .)
 +    set(opentrack-doc-pfx "./doc")
 +    set(opentrack-doc-src-pfx "./source-code")
 +    set(opentrack-i18n-pfx "./i18n")
 +    set(opentrack-i18n-path "./i18n")
 +elseif(WIN32)
 +    set(opentrack-hier-pfx "./modules")
 +    set(opentrack-hier-path "/modules/")
 +    set(opentrack-hier-doc "/doc/")
 +    set(opentrack-doc-pfx "./doc")
 +    set(opentrack-doc-src-pfx "./source-code")
 +    set(opentrack-hier-str RUNTIME DESTINATION ./modules/ LIBRARY DESTINATION ./modules/)
 +    set(opentrack-i18n-pfx "./i18n")
 +    set(opentrack-i18n-path "./i18n")
 +else()
 +    set(opentrack-hier-pfx "libexec/opentrack")
 +    set(opentrack-hier-path "/../libexec/opentrack/")
 +    set(opentrack-hier-doc "/share/doc/opentrack/")
 +    set(opentrack-doc-pfx "./share/doc/opentrack")
 +    set(opentrack-doc-src-pfx "./share/doc/opentrack/source-code")
 +    set(opentrack-install-rpath "${CMAKE_INSTALL_PREFIX}/${opentrack-hier-pfx}")
 +    set(opentrack-hier-str ARCHIVE DESTINATION lib/opentrack LIBRARY DESTINATION ${opentrack-hier-pfx} RUNTIME DESTINATION bin)
 +    set(opentrack-i18n-pfx "./libexec/opentrack/i18n")
 +    set(opentrack-i18n-path "../libexec/opentrack/i18n")
 +endif()
 -    function(opentrack_escape_string var str)
 -        string(REGEX REPLACE "([\$\\\"#])" "\\\\\\1" tmp__ "${str}")
 -            set(${var} "${tmp__}" PARENT_SCOPE)
 -    endfunction()
 +function(otr_escape_string var str)
 +    string(REGEX REPLACE "([\$\\\"#])" "\\\\\\1" tmp__ "${str}")
 +        set(${var} "${tmp__}" PARENT_SCOPE)
 +endfunction()
 -    function(opentrack_setup_refresh_install_dir)
 -        if((NOT CMAKE_INSTALL_PREFIX STREQUAL "") AND (NOT opentrack-doc-src-pfx STREQUAL ""))
 -            opentrack_escape_string(dir "${CMAKE_INSTALL_PREFIX}/${opentrack-doc-src-pfx}/")
 -            install(CODE "file(REMOVE_RECURSE \"${dir}\")")
 -        endif()
 -    endfunction()
 +function(otr_setup_refresh_install_dir)
 +    if((NOT CMAKE_INSTALL_PREFIX STREQUAL "") AND (NOT opentrack-doc-src-pfx STREQUAL ""))
 +        otr_escape_string(dir "${CMAKE_INSTALL_PREFIX}/${opentrack-doc-src-pfx}/")
 +        install(CODE "file(REMOVE_RECURSE \"${dir}\")")
 +    endif()
 +endfunction()
 -    opentrack_setup_refresh_install_dir()
 +otr_setup_refresh_install_dir()
 -    set(opentrack-contrib-pfx "${opentrack-doc-pfx}/contrib")
 +set(opentrack-contrib-pfx "${opentrack-doc-pfx}/contrib")
 -    set(opentrack-binary-suffix "")
 -    if(APPLE)
 -        set(opentrack-binary-suffix ".bin")
 -    elseif(WIN32)
 -        set(opentrack-binary-suffix ".exe")
 -    endif()
 -endif() # include guard
 +set(opentrack-binary-suffix "")
 +if(APPLE)
 +    set(opentrack-binary-suffix ".bin")
 +elseif(WIN32)
 +    set(opentrack-binary-suffix ".exe")
 +endif()
 diff --git a/cmake/opentrack-install.cmake b/cmake/opentrack-install.cmake index e4f3b2b2..92250bb2 100644 --- a/cmake/opentrack-install.cmake +++ b/cmake/opentrack-install.cmake @@ -1,11 +1,11 @@  set(opentrack-perms_ WORLD_READ WORLD_EXECUTE OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE)  set(opentrack-perms PERMISSIONS ${opentrack-perms_}) -macro(opentrack_inst2 path) +macro(otr_inst2 path)      install(${ARGN} DESTINATION "${path}" ${opentrack-perms})  endmacro() -macro(opentrack_inst_dir path) +macro(otr_inst_dir path)      install(          DIRECTORY ${ARGN} DESTINATION "${path}"          FILE_PERMISSIONS ${opentrack-perms_} @@ -17,35 +17,35 @@ function(install_sources)      get_property(source-dirs GLOBAL PROPERTY opentrack-all-source-dirs)      foreach(k ${source-dirs})          file(RELATIVE_PATH dest "${CMAKE_SOURCE_DIR}" "${k}") -        opentrack_inst_dir("${opentrack-doc-src-pfx}" "${dest}") +        otr_inst_dir("${opentrack-doc-src-pfx}" "${dest}")      endforeach()  endfunction() -opentrack_inst_dir("${opentrack-doc-pfx}" ${CMAKE_SOURCE_DIR}/3rdparty-notices) -opentrack_inst_dir("${opentrack-doc-pfx}" "${CMAKE_SOURCE_DIR}/settings" "${CMAKE_SOURCE_DIR}/contrib") -opentrack_inst_dir("${opentrack-doc-src-pfx}" "${CMAKE_SOURCE_DIR}/cmake") -opentrack_inst_dir("${opentrack-doc-src-pfx}" "${CMAKE_SOURCE_DIR}/bin") +otr_inst_dir("${opentrack-doc-pfx}" ${CMAKE_SOURCE_DIR}/3rdparty-notices) +otr_inst_dir("${opentrack-doc-pfx}" "${CMAKE_SOURCE_DIR}/settings" "${CMAKE_SOURCE_DIR}/contrib") +otr_inst_dir("${opentrack-doc-src-pfx}" "${CMAKE_SOURCE_DIR}/cmake") +otr_inst_dir("${opentrack-doc-src-pfx}" "${CMAKE_SOURCE_DIR}/bin")  if(WIN32) -    opentrack_inst2(. FILES "${CMAKE_SOURCE_DIR}/bin/qt.conf") -    opentrack_inst2(. FILES "${CMAKE_SOURCE_DIR}/bin/cleye.config") -    opentrack_inst2(${opentrack-hier-pfx} FILES "${CMAKE_SOURCE_DIR}/bin/cleye.config") +    otr_inst2(. FILES "${CMAKE_SOURCE_DIR}/bin/qt.conf") +    otr_inst2(. FILES "${CMAKE_SOURCE_DIR}/bin/cleye.config") +    otr_inst2(${opentrack-hier-pfx} FILES "${CMAKE_SOURCE_DIR}/bin/cleye.config")  endif() -opentrack_inst2("${opentrack-doc-pfx}" FILES ${CMAKE_SOURCE_DIR}/README.md) +otr_inst2("${opentrack-doc-pfx}" FILES ${CMAKE_SOURCE_DIR}/README.md) -opentrack_inst2("${opentrack-hier-pfx}" FILES "${CMAKE_SOURCE_DIR}/bin/freetrackclient.dll") -opentrack_inst2("${opentrack-hier-pfx}" FILES +otr_inst2("${opentrack-hier-pfx}" FILES "${CMAKE_SOURCE_DIR}/bin/freetrackclient.dll") +otr_inst2("${opentrack-hier-pfx}" FILES      "${CMAKE_SOURCE_DIR}/bin/NPClient.dll"      "${CMAKE_SOURCE_DIR}/bin/NPClient64.dll"      "${CMAKE_SOURCE_DIR}/bin/TrackIR.exe") -opentrack_inst2("${opentrack-doc-src-pfx}" FILES "${CMAKE_SOURCE_DIR}/CMakeLists.txt") -opentrack_inst2("${opentrack-doc-src-pfx}" FILES "${CMAKE_SOURCE_DIR}/README.md") -opentrack_inst2("${opentrack-doc-src-pfx}" FILES "${CMAKE_SOURCE_DIR}/CONTRIBUTING.md") -opentrack_inst2("${opentrack-doc-src-pfx}" FILES "${CMAKE_SOURCE_DIR}/WARRANTY.txt") -opentrack_inst2("${opentrack-doc-src-pfx}" FILES "${CMAKE_SOURCE_DIR}/OPENTRACK-LICENSING.txt") -opentrack_inst2("${opentrack-doc-src-pfx}" FILES "${CMAKE_SOURCE_DIR}/AUTHORS.md") +otr_inst2("${opentrack-doc-src-pfx}" FILES "${CMAKE_SOURCE_DIR}/CMakeLists.txt") +otr_inst2("${opentrack-doc-src-pfx}" FILES "${CMAKE_SOURCE_DIR}/README.md") +otr_inst2("${opentrack-doc-src-pfx}" FILES "${CMAKE_SOURCE_DIR}/CONTRIBUTING.md") +otr_inst2("${opentrack-doc-src-pfx}" FILES "${CMAKE_SOURCE_DIR}/WARRANTY.txt") +otr_inst2("${opentrack-doc-src-pfx}" FILES "${CMAKE_SOURCE_DIR}/OPENTRACK-LICENSING.txt") +otr_inst2("${opentrack-doc-src-pfx}" FILES "${CMAKE_SOURCE_DIR}/AUTHORS.md")  function(merge_translations)      set(all-deps "") diff --git a/cmake/opentrack-platform.cmake b/cmake/opentrack-platform.cmake index 721d5675..ab3a5f8b 100644 --- a/cmake/opentrack-platform.cmake +++ b/cmake/opentrack-platform.cmake @@ -74,7 +74,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)  set(CMAKE_AUTOMOC OFF)  set(CMAKE_POSITION_INDEPENDENT_CODE ON) -include_directories(${CMAKE_SOURCE_DIR}) +include_directories("${CMAKE_SOURCE_DIR}")  if(APPLE)      set(CMAKE_MACOSX_RPATH OFF) @@ -105,7 +105,7 @@ function(fix_flags lang flag replacement)      if(".${replacement}" STREQUAL ".")          set(pfx "")      endif() -    opentrack_escape_string(flag "${flag}") +    otr_escape_string(flag "${flag}")      foreach(k _DEBUG _RELEASE _MINSIZEREL _RELWITHDEBINFO "")          set(tmp "${CMAKE_${lang}_FLAGS${k}}")          if(NOT ".${replacement}" STREQUAL ".") diff --git a/cmake/opentrack-qt.cmake b/cmake/opentrack-qt.cmake index 5b851508..66618c59 100644 --- a/cmake/opentrack-qt.cmake +++ b/cmake/opentrack-qt.cmake @@ -26,7 +26,7 @@ if(MSVC)          # cross tools, etc. which is a can of worms and if/else branches.          get_filename_component(linker-dir "${CMAKE_LINKER}" DIRECTORY)          find_file(editbin-executable-filepath "editbin.exe" "${linker-dir}" "${linker-dir}/.." "${linker-dir}/../..") -        opentrack_escape_string("${editbin-executable-filepath}" editbin-executable) +        otr_escape_string("${editbin-executable-filepath}" editbin-executable)      else()          set(editbin-executable "editbin")      endif() diff --git a/cmake/opentrack-rift.cmake b/cmake/opentrack-rift.cmake index 63ee47e5..88adbb3e 100644 --- a/cmake/opentrack-rift.cmake +++ b/cmake/opentrack-rift.cmake @@ -1,40 +1,37 @@ -if(NOT opentrack-rift-included) -    set(opentrack-rift-included TRUE) -    function(opentrack_rift_boilerplate proj opt) -        if(${opt}) -            set(link-flags) -            set(c-flags) -            if(APPLE) -                set(link-flags "-framework CoreFoundation -framework CoreGraphics -framework IOKit -framework Quartz") -                set(c-flags "-fno-strict-aliasing") -            elseif(NOT MSVC) -                set(c-flags "-fno-strict-aliasing") -            endif() -            opentrack_boilerplate(${proj} LINK ${link-flags} COMPILE ${c-flags}) -            set(proj ${proj}) -            target_include_directories(${proj} SYSTEM PUBLIC ${${opt}}/Include ${${opt}}/Src) -            set(c-flags) -            set(link-flags) -            if(MSVC) -                set(ext lib) -                set(p) -            else() -                set(ext a) -                set(p lib) -            endif() -            if(MSVC) -                set(pfx "") -            else() -                set(pfx "lib") -            endif() -            target_link_libraries(${proj} ${${opt}}/${pfx}LibOVR.${ext}) -            if(WIN32) -                target_link_libraries(${proj} winmm setupapi ws2_32 imagehlp wbemuuid) -                set(ext) -                set(p) -            elseif(NOT APPLE) -                target_link_libraries(${proj} udev Xinerama) -            endif() +function(otr_rift proj opt) +    if(${opt}) +        set(link-flags) +        set(c-flags) +        if(APPLE) +            set(link-flags "-framework CoreFoundation -framework CoreGraphics -framework IOKit -framework Quartz") +            set(c-flags "-fno-strict-aliasing") +        elseif(NOT MSVC) +            set(c-flags "-fno-strict-aliasing")          endif() -    endfunction() -endif() +        otr_module(${proj} LINK ${link-flags} COMPILE ${c-flags}) +        set(proj "opentrack-${proj}") +        target_include_directories(${proj} SYSTEM PUBLIC ${${opt}}/Include ${${opt}}/Src) +        set(c-flags) +        set(link-flags) +        if(MSVC) +            set(ext lib) +            set(p) +        else() +            set(ext a) +            set(p lib) +        endif() +        if(MSVC) +            set(pfx "") +        else() +            set(pfx "lib") +        endif() +        target_link_libraries(${proj} ${${opt}}/${pfx}LibOVR.${ext}) +        if(WIN32) +            target_link_libraries(${proj} winmm setupapi ws2_32 imagehlp wbemuuid) +            set(ext) +            set(p) +        elseif(NOT APPLE) +            target_link_libraries(${proj} udev Xinerama) +        endif() +    endif() +endfunction() diff --git a/cmake/opentrack-version.cmake b/cmake/opentrack-version.cmake index d5eba541..9cd597d3 100644 --- a/cmake/opentrack-version.cmake +++ b/cmake/opentrack-version.cmake @@ -42,4 +42,4 @@ add_library(opentrack-version STATIC ${CMAKE_BINARY_DIR}/version.c)  if(NOT MSVC)      set_property(TARGET opentrack-version APPEND_STRING PROPERTY COMPILE_FLAGS "-fno-lto")  endif() -opentrack_compat(opentrack-version) +otr_compat(opentrack-version) diff --git a/compat/CMakeLists.txt b/compat/CMakeLists.txt index 7404bdfb..40850862 100644 --- a/compat/CMakeLists.txt +++ b/compat/CMakeLists.txt @@ -1,4 +1,4 @@ -opentrack_boilerplate(opentrack-compat NO-COMPAT BIN) +otr_module(compat NO-COMPAT BIN)  if(NOT WIN32 AND NOT APPLE)      target_link_libraries(opentrack-compat rt) diff --git a/csv/CMakeLists.txt b/csv/CMakeLists.txt index 1590ec59..82595688 100644 --- a/csv/CMakeLists.txt +++ b/csv/CMakeLists.txt @@ -1,2 +1,2 @@ -opentrack_boilerplate(opentrack-csv) +otr_module(csv)  target_link_libraries(opentrack-csv opentrack-api) diff --git a/cv/CMakeLists.txt b/cv/CMakeLists.txt index 6a1a18b4..67a27ee9 100644 --- a/cv/CMakeLists.txt +++ b/cv/CMakeLists.txt @@ -1,6 +1,6 @@  find_package(OpenCV 3.0 QUIET COMPONENTS ${opencv-modules})  if(OpenCV_FOUND) -    opentrack_boilerplate(opentrack-cv STATIC) +    otr_module(cv STATIC)      target_link_libraries(opentrack-cv ${OpenCV_LIBS})      target_include_directories(opentrack-cv SYSTEM PUBLIC ${OpenCV_INCLUDE_DIRS})  endif() diff --git a/dinput/CMakeLists.txt b/dinput/CMakeLists.txt index 6c373537..c6962fcd 100644 --- a/dinput/CMakeLists.txt +++ b/dinput/CMakeLists.txt @@ -1,4 +1,4 @@  if(WIN32) -    opentrack_boilerplate(opentrack-dinput BIN) +    otr_module(dinput BIN)      target_link_libraries(opentrack-dinput dinput8)  endif() diff --git a/filter-accela/CMakeLists.txt b/filter-accela/CMakeLists.txt index 5bfa8128..61286764 100644 --- a/filter-accela/CMakeLists.txt +++ b/filter-accela/CMakeLists.txt @@ -1,2 +1,2 @@ -opentrack_boilerplate(opentrack-filter-accela) +otr_module(filter-accela)  target_link_libraries(opentrack-filter-accela opentrack-spline-widget) diff --git a/filter-ewma2/CMakeLists.txt b/filter-ewma2/CMakeLists.txt index af786487..6c4e8feb 100644 --- a/filter-ewma2/CMakeLists.txt +++ b/filter-ewma2/CMakeLists.txt @@ -1 +1 @@ -opentrack_boilerplate(opentrack-filter-ewma) +otr_module(filter-ewma) diff --git a/filter-kalman/CMakeLists.txt b/filter-kalman/CMakeLists.txt index 1d1c6412..b6f8100e 100644 --- a/filter-kalman/CMakeLists.txt +++ b/filter-kalman/CMakeLists.txt @@ -1,5 +1,5 @@  find_package(Eigen3 QUIET)  if(EIGEN3_FOUND) -    opentrack_boilerplate(opentrack-filter-kalman) +    otr_module(filter-kalman)      target_include_directories(opentrack-filter-kalman SYSTEM PUBLIC ${EIGEN3_INCLUDE_DIR})  endif() diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index 2d6b80be..25181fce 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -10,7 +10,7 @@ if(WIN32)      SET(SDK_CONSOLE_DEBUG FALSE CACHE BOOL "Console window visible at runtime")  endif() -opentrack_boilerplate(opentrack-user-interface EXECUTABLE BIN ${console}) +otr_module(user-interface EXECUTABLE BIN ${console})  set_target_properties(opentrack-user-interface PROPERTIES      SUFFIX "${opentrack-binary-suffix}" diff --git a/logic/CMakeLists.txt b/logic/CMakeLists.txt index 88b0240f..ddbb9509 100644 --- a/logic/CMakeLists.txt +++ b/logic/CMakeLists.txt @@ -1,4 +1,4 @@ -opentrack_boilerplate(opentrack-logic BIN) +otr_module(logic BIN)  target_link_libraries(opentrack-logic opentrack-spline-widget)  if(NOT WIN32)      target_link_libraries(opentrack-logic opentrack-qxt-mini) diff --git a/macosx/CMakeLists.txt b/macosx/CMakeLists.txt index e4bdf59a..89901251 100644 --- a/macosx/CMakeLists.txt +++ b/macosx/CMakeLists.txt @@ -1,8 +1,8 @@  if(APPLE) -    opentrack_escape_string(srcdir "${CMAKE_SOURCE_DIR}") -    opentrack_escape_string(bindir "${CMAKE_BINARY_DIR}") -    opentrack_escape_string(instdir "${CMAKE_INSTALL_PREFIX}") -    opentrack_escape_string(commit "${OPENTRACK_COMMIT}") +    otr_escape_string(srcdir "${CMAKE_SOURCE_DIR}") +    otr_escape_string(bindir "${CMAKE_BINARY_DIR}") +    otr_escape_string(instdir "${CMAKE_INSTALL_PREFIX}") +    otr_escape_string(commit "${OPENTRACK_COMMIT}")      install(CODE "          execute_process(COMMAND /bin/sh \"${srcdir}/macosx/make-app-bundle.sh\"                                          \"${srcdir}/macosx\" diff --git a/migration/CMakeLists.txt b/migration/CMakeLists.txt index d220b002..ff4dfae2 100644 --- a/migration/CMakeLists.txt +++ b/migration/CMakeLists.txt @@ -1,2 +1,2 @@ -opentrack_boilerplate(opentrack-migration BIN) +otr_module(migration BIN)  target_link_libraries(opentrack-migration opentrack-logic opentrack-spline-widget) diff --git a/options/CMakeLists.txt b/options/CMakeLists.txt index 25749bf5..cbebeb87 100644 --- a/options/CMakeLists.txt +++ b/options/CMakeLists.txt @@ -1,4 +1,4 @@ -opentrack_boilerplate(opentrack-options NO-COMPAT BIN) +otr_module(options NO-COMPAT BIN)  if(NOT WIN32 AND NOT APPLE)      target_link_libraries(opentrack-options rt)  endif() diff --git a/pose-widget/CMakeLists.txt b/pose-widget/CMakeLists.txt index d73ee037..fd109bc3 100644 --- a/pose-widget/CMakeLists.txt +++ b/pose-widget/CMakeLists.txt @@ -1,2 +1,2 @@ -opentrack_boilerplate(opentrack-pose-widget BIN) +otr_module(pose-widget BIN)  target_link_libraries(opentrack-pose-widget) diff --git a/proto-fg/CMakeLists.txt b/proto-fg/CMakeLists.txt index 151b30ee..cdfe18a6 100644 --- a/proto-fg/CMakeLists.txt +++ b/proto-fg/CMakeLists.txt @@ -1 +1 @@ -opentrack_boilerplate(opentrack-proto-fgfs) +otr_module(proto-fgfs) diff --git a/proto-fsuipc/CMakeLists.txt b/proto-fsuipc/CMakeLists.txt index 57da4b1a..b3e94c32 100644 --- a/proto-fsuipc/CMakeLists.txt +++ b/proto-fsuipc/CMakeLists.txt @@ -1,7 +1,7 @@  if(WIN32)      set(SDK_FSUIPC "" CACHE PATH "FSUIPC for older MS FSX path")      if(SDK_FSUIPC) -        opentrack_boilerplate(opentrack-proto-fsuipc) +        otr_module(proto-fsuipc)          target_link_libraries(opentrack-proto-fsuipc ${SDK_FSUIPC}/FSUIPC_User.lib)          target_include_directories(opentrack-proto-fsuipc SYSTEM PUBLIC ${SDK_FSUIPC})          if(MSVC) diff --git a/proto-ft/CMakeLists.txt b/proto-ft/CMakeLists.txt index fb22ede4..18570efe 100644 --- a/proto-ft/CMakeLists.txt +++ b/proto-ft/CMakeLists.txt @@ -1,4 +1,4 @@  if(WIN32) -    opentrack_boilerplate(opentrack-proto-freetrack) +    otr_module(proto-freetrack)      target_link_libraries(opentrack-proto-freetrack opentrack-csv)  endif() diff --git a/proto-ftn/CMakeLists.txt b/proto-ftn/CMakeLists.txt index a0b74d9c..abba4f52 100644 --- a/proto-ftn/CMakeLists.txt +++ b/proto-ftn/CMakeLists.txt @@ -1 +1 @@ -opentrack_boilerplate(opentrack-proto-udp) +otr_module(proto-udp) diff --git a/proto-libevdev/CMakeLists.txt b/proto-libevdev/CMakeLists.txt index 960a1271..f2809c93 100644 --- a/proto-libevdev/CMakeLists.txt +++ b/proto-libevdev/CMakeLists.txt @@ -2,7 +2,7 @@ if(LINUX OR APPLE)      set(SDK_ENABLE_LIBEVDEV FALSE CACHE BOOL "libevdev virtual joystick protocol support")      if(SDK_ENABLE_LIBEVDEV)          include(FindPkgConfig) -        opentrack_boilerplate(opentrack-proto-libevdev) +        otr_module(proto-libevdev)          pkg_check_modules(libevdev REQUIRED QUIET libevdev)          target_link_libraries(opentrack-proto-libevdev ${libevdev_LIBRARIES})          include_directories(opentrack-proto-libevdev SYSTEM PUBLIC ${libevdev_INCLUDE_DIRS}) diff --git a/proto-mouse/CMakeLists.txt b/proto-mouse/CMakeLists.txt index b221c79c..07f25b69 100644 --- a/proto-mouse/CMakeLists.txt +++ b/proto-mouse/CMakeLists.txt @@ -1,3 +1,3 @@  if(WIN32) -    opentrack_boilerplate(opentrack-proto-win32-mouse) +    otr_module(proto-win32-mouse)  endif() diff --git a/proto-sc/CMakeLists.txt b/proto-sc/CMakeLists.txt index bd83e944..26047b6f 100644 --- a/proto-sc/CMakeLists.txt +++ b/proto-sc/CMakeLists.txt @@ -1,3 +1,3 @@  if(WIN32) -    opentrack_boilerplate(opentrack-proto-simconnect) +    otr_module(proto-simconnect)  endif() diff --git a/proto-vjoystick/CMakeLists.txt b/proto-vjoystick/CMakeLists.txt index d0cfe591..41af2883 100644 --- a/proto-vjoystick/CMakeLists.txt +++ b/proto-vjoystick/CMakeLists.txt @@ -8,7 +8,7 @@ if(WIN32)          endif()          set(lib "${SDK_VJOYSTICK}/lib/${arch}vJoyInterface.lib")          set(dll "${SDK_VJOYSTICK}/lib/${arch}vJoyInterface.dll") -        opentrack_boilerplate(opentrack-proto-vjoy) +        otr_module(proto-vjoy)          target_link_libraries(opentrack-proto-vjoy ${lib})          target_include_directories(opentrack-proto-vjoy SYSTEM PUBLIC "${SDK_VJOYSTICK}/inc")          install(FILES "${dll}" DESTINATION ${opentrack-hier-pfx}) diff --git a/proto-wine/CMakeLists.txt b/proto-wine/CMakeLists.txt index 3c1f4789..629f47f3 100644 --- a/proto-wine/CMakeLists.txt +++ b/proto-wine/CMakeLists.txt @@ -2,7 +2,7 @@ if(NOT WIN32)      set(SDK_WINE_PREFIX "" CACHE PATH "Wine install prefix")      set(SDK_WINE_NO_WRAPPER FALSE CACHE BOOL "disable Wine wrapper -- use Wine only for X-Plane")      if(SDK_WINE_PREFIX) -        opentrack_boilerplate(opentrack-proto-wine) +        otr_module(proto-wine)          target_link_libraries(opentrack-proto-wine opentrack-csv)          if(NOT SDK_WINE_NO_WRAPPER)              set(my-rt -lrt) diff --git a/qxt-mini/CMakeLists.txt b/qxt-mini/CMakeLists.txt index 6b71c500..d09cbdfa 100644 --- a/qxt-mini/CMakeLists.txt +++ b/qxt-mini/CMakeLists.txt @@ -1,5 +1,5 @@  if(UNIX OR APPLE) -    opentrack_boilerplate(opentrack-qxt-mini NO-COMPAT BIN) +    otr_module(qxt-mini NO-COMPAT BIN)      if(NOT APPLE)          target_link_libraries(opentrack-qxt-mini X11)      else() diff --git a/spline-widget/CMakeLists.txt b/spline-widget/CMakeLists.txt index 8ef96cc6..5cc25ab8 100644 --- a/spline-widget/CMakeLists.txt +++ b/spline-widget/CMakeLists.txt @@ -1,2 +1,2 @@ -opentrack_boilerplate(opentrack-spline-widget NO-COMPAT BIN) +otr_module(spline-widget NO-COMPAT BIN)  target_link_libraries(opentrack-spline-widget opentrack-options opentrack-compat) diff --git a/tracker-aruco/CMakeLists.txt b/tracker-aruco/CMakeLists.txt index d68b8f59..506c9bd1 100644 --- a/tracker-aruco/CMakeLists.txt +++ b/tracker-aruco/CMakeLists.txt @@ -2,7 +2,7 @@ find_package(OpenCV 3.0 QUIET)  if(OpenCV_FOUND)      set(SDK_ARUCO_LIBPATH "" CACHE FILEPATH "Aruco paper marker tracker static library path")      if(SDK_ARUCO_LIBPATH) -        opentrack_boilerplate(opentrack-tracker-aruco) +        otr_module(tracker-aruco)          target_link_libraries(opentrack-tracker-aruco opentrack-cv ${SDK_ARUCO_LIBPATH} ${OpenCV_LIBS})          target_include_directories(opentrack-tracker-aruco SYSTEM PUBLIC ${OpenCV_INCLUDE_DIRS})      endif() diff --git a/tracker-freepie-udp/CMakeLists.txt b/tracker-freepie-udp/CMakeLists.txt index 34cb2fdc..d792ba93 100644 --- a/tracker-freepie-udp/CMakeLists.txt +++ b/tracker-freepie-udp/CMakeLists.txt @@ -1 +1 @@ -opentrack_boilerplate(opentrack-tracker-freepie-udp) +otr_module(tracker-freepie-udp) diff --git a/tracker-hatire/CMakeLists.txt b/tracker-hatire/CMakeLists.txt index e4c7b9d1..39431724 100644 --- a/tracker-hatire/CMakeLists.txt +++ b/tracker-hatire/CMakeLists.txt @@ -1,5 +1,5 @@  if(Qt5SerialPort_FOUND) -    opentrack_boilerplate(opentrack-tracker-hatire) +    otr_module(tracker-hatire)      target_link_libraries(opentrack-tracker-hatire ${Qt5SerialPort_LIBRARIES})      target_include_directories(opentrack-tracker-hatire SYSTEM PUBLIC ${Qt5SerialPort_INCLUDE_DIRS})  endif() diff --git a/tracker-ht/CMakeLists.txt b/tracker-ht/CMakeLists.txt index 06791993..86684799 100644 --- a/tracker-ht/CMakeLists.txt +++ b/tracker-ht/CMakeLists.txt @@ -4,7 +4,7 @@ set(SDK_HT_FLANDMARK "" CACHE FILEPATH "Path to flandmark library for headtracke  find_package(OpenCV 3.0 QUIET COMPONENTS ${opencv-modules})  if(OpenCV_FOUND)      if(SDK_HT AND SDK_HT_FLANDMARK) -        opentrack_boilerplate(opentrack-tracker-ht) +        otr_module(tracker-ht)          target_link_libraries(opentrack-tracker-ht ${SDK_HT} ${SDK_HT_FLANDMARK} ${OpenCV_LIBS})          target_include_directories(opentrack-tracker-ht SYSTEM PUBLIC ${OpenCV_INCLUDE_DIRS})      endif() diff --git a/tracker-hydra/CMakeLists.txt b/tracker-hydra/CMakeLists.txt index 2042c944..afac8d89 100644 --- a/tracker-hydra/CMakeLists.txt +++ b/tracker-hydra/CMakeLists.txt @@ -1,6 +1,6 @@  set(SDK_HYDRA "" CACHE PATH "libSixense path for Razer Hydra")  if(SDK_HYDRA) -    opentrack_boilerplate(opentrack-tracker-hydra) +    otr_module(tracker-hydra)      target_include_directories(opentrack-tracker-hydra SYSTEM PUBLIC ${SDK_HYDRA}/include ${SDK_HYDRA}/include/sixense_utils)      if(opentrack-64bit)          set(six4 _x64) diff --git a/tracker-joystick/CMakeLists.txt b/tracker-joystick/CMakeLists.txt index 03f14b62..63dc7c6c 100644 --- a/tracker-joystick/CMakeLists.txt +++ b/tracker-joystick/CMakeLists.txt @@ -1,5 +1,5 @@  if(WIN32) -    opentrack_boilerplate(opentrack-tracker-joystick) +    otr_module(tracker-joystick)      target_link_libraries(opentrack-tracker-joystick opentrack-dinput)  endif() diff --git a/tracker-pt/CMakeLists.txt b/tracker-pt/CMakeLists.txt index 27652eaa..abc7fb33 100644 --- a/tracker-pt/CMakeLists.txt +++ b/tracker-pt/CMakeLists.txt @@ -1,6 +1,6 @@  find_package(OpenCV 3.0 QUIET COMPONENTS ${opencv-modules})  if(OpenCV_FOUND) -    opentrack_boilerplate(opentrack-tracker-pt) +    otr_module(tracker-pt)      target_link_libraries(opentrack-tracker-pt opentrack-cv ${OpenCV_LIBS})      target_include_directories(opentrack-tracker-pt SYSTEM PUBLIC ${OpenCV_INCLUDE_DIRS})  endif() diff --git a/tracker-qt-gamepad/CMakeLists.txt b/tracker-qt-gamepad/CMakeLists.txt index c892c5c6..a5bd040e 100644 --- a/tracker-qt-gamepad/CMakeLists.txt +++ b/tracker-qt-gamepad/CMakeLists.txt @@ -1,3 +1,3 @@  if(FALSE AND Qt5Gamepad_FOUND) -    opentrack_boilerplate(opentrack-tracker-qt-gamepad) +    otr_module(tracker-qt-gamepad)  endif() diff --git a/tracker-rift-025/CMakeLists.txt b/tracker-rift-025/CMakeLists.txt index ee9ff8aa..36d3f08f 100644 --- a/tracker-rift-025/CMakeLists.txt +++ b/tracker-rift-025/CMakeLists.txt @@ -1,4 +1,4 @@  include(opentrack-rift) -opentrack_rift_boilerplate(opentrack-tracker-rift-025 SDK_RIFT_025) +otr_rift(tracker-rift-025 SDK_RIFT_025)  SET(SDK_RIFT_025 "" CACHE PATH "libOVR 0.2.5 path for Oculus Rift") diff --git a/tracker-rift-042/CMakeLists.txt b/tracker-rift-042/CMakeLists.txt index 9d444cd0..594e7c5c 100644 --- a/tracker-rift-042/CMakeLists.txt +++ b/tracker-rift-042/CMakeLists.txt @@ -1,3 +1,3 @@  include(opentrack-rift) -opentrack_rift_boilerplate(opentrack-tracker-rift-042 SDK_RIFT_042) +otr_rift(tracker-rift-042 SDK_RIFT_042)  SET(SDK_RIFT_042 "" CACHE PATH "libOVR 0.4.2 path for Oculus Rift") diff --git a/tracker-rift-080/CMakeLists.txt b/tracker-rift-080/CMakeLists.txt index e59e9fdc..2d89e442 100644 --- a/tracker-rift-080/CMakeLists.txt +++ b/tracker-rift-080/CMakeLists.txt @@ -1,3 +1,3 @@  include(opentrack-rift) -opentrack_rift_boilerplate(opentrack-tracker-rift-080 SDK_RIFT_080) +otr_rift(tracker-rift-080 SDK_RIFT_080)  SET(SDK_RIFT_080 "" CACHE PATH "libOVR 0.8.0 path for Oculus Rift") diff --git a/tracker-rift-140/CMakeLists.txt b/tracker-rift-140/CMakeLists.txt index 55a6f9b4..c0235142 100644 --- a/tracker-rift-140/CMakeLists.txt +++ b/tracker-rift-140/CMakeLists.txt @@ -1,3 +1,3 @@  include(opentrack-rift) -opentrack_rift_boilerplate(opentrack-tracker-rift-140 SDK_RIFT_140) +otr_rift(tracker-rift-140 SDK_RIFT_140)  SET(SDK_RIFT_140 "" CACHE PATH "libOVR 1.4.0 path for Oculus Rift") diff --git a/tracker-rs/CMakeLists.txt b/tracker-rs/CMakeLists.txt index 109613d6..7fda508e 100644 --- a/tracker-rs/CMakeLists.txt +++ b/tracker-rs/CMakeLists.txt @@ -4,7 +4,7 @@ if(WIN32 AND SDK_REALSENSE)      if(CMAKE_COMPILER_IS_GNUCC)          add_definitions(-fpermissive) # for SDK headers      endif() -    opentrack_boilerplate(opentrack-tracker-rs) +    otr_module(tracker-rs)      install(FILES "${CMAKE_SOURCE_DIR}/tracker-rs/redist/intel_rs_sdk_runtime_websetup_10.0.26.0396.exe" DESTINATION ${opentrack-contrib-pfx} ${opentrack-perms})      install(FILES "${CMAKE_SOURCE_DIR}/tracker-rs/redist/RS_EULA.rtf" DESTINATION ${opentrack-contrib-pfx} ${opentrack-perms})      add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/rs_impl") diff --git a/tracker-rs/rs_impl/CMakeLists.txt b/tracker-rs/rs_impl/CMakeLists.txt index 24c96b53..7148cdf1 100644 --- a/tracker-rs/rs_impl/CMakeLists.txt +++ b/tracker-rs/rs_impl/CMakeLists.txt @@ -1,5 +1,5 @@  if(WIN32) -    opentrack_boilerplate(opentrack-tracker-rs-impl STATIC NO-QT SOURCES "${SDK_REALSENSE}/opensource/src/libpxc/libpxc.cpp") +    otr_module(tracker-rs-impl STATIC NO-QT SOURCES "${SDK_REALSENSE}/opensource/src/libpxc/libpxc.cpp")      target_compile_definitions(opentrack-tracker-rs-impl PRIVATE -DUNICODE -D_UNICODE)      target_include_directories(opentrack-tracker-rs-impl PRIVATE SYSTEM "${SDK_REALSENSE}/include")      target_link_libraries(opentrack-tracker-rs-impl advapi32) diff --git a/tracker-steamvr/CMakeLists.txt b/tracker-steamvr/CMakeLists.txt index 4c81e4a3..36be2f13 100644 --- a/tracker-steamvr/CMakeLists.txt +++ b/tracker-steamvr/CMakeLists.txt @@ -27,7 +27,7 @@ endif()  if(steamvr-dll)      SET(SDK_VALVE_STEAMVR "" CACHE PATH "Valve's SteamVR")      if(SDK_VALVE_STEAMVR) -        opentrack_boilerplate(opentrack-tracker-steamvr NO-INSTALL) +        otr_module(tracker-steamvr NO-INSTALL)          #install(FILES "${SDK_VALVE_STEAMVR}/bin/${steamvr-dir}/${steamvr-dll}" DESTINATION "${opentrack-hier-pfx}")          target_include_directories(opentrack-tracker-steamvr SYSTEM PUBLIC "${SDK_VALVE_STEAMVR}/headers") diff --git a/tracker-test/CMakeLists.txt b/tracker-test/CMakeLists.txt index 81fcf667..334aa38e 100644 --- a/tracker-test/CMakeLists.txt +++ b/tracker-test/CMakeLists.txt @@ -1,4 +1,4 @@  set(SDK_TEST_TRACKER FALSE CACHE BOOL "sine wave test tracker")  if(SDK_TEST_TRACKER) -    opentrack_boilerplate(opentrack-tracker-test) +    otr_module(tracker-test)  endif() diff --git a/tracker-tobii-eyex/CMakeLists.txt b/tracker-tobii-eyex/CMakeLists.txt index bbf5bad3..66fa90ae 100644 --- a/tracker-tobii-eyex/CMakeLists.txt +++ b/tracker-tobii-eyex/CMakeLists.txt @@ -2,7 +2,7 @@ if(WIN32)      set(SDK_TOBII_EYEX "" CACHE PATH "")      if(SDK_TOBII_EYEX)          set(porked NO-INSTALL) -        opentrack_boilerplate(opentrack-tracker-tobii-eyex ${porked}) +        otr_module(tracker-tobii-eyex ${porked})          target_link_libraries(opentrack-tracker-tobii-eyex opentrack-spline-widget)          set(tobii-libdir ${SDK_TOBII_EYEX}/lib/x86/)          set(tobii-dll ${tobii-libdir}/Tobii.EyeX.Client.dll) diff --git a/tracker-udp/CMakeLists.txt b/tracker-udp/CMakeLists.txt index 51e96773..2d17f573 100644 --- a/tracker-udp/CMakeLists.txt +++ b/tracker-udp/CMakeLists.txt @@ -1 +1 @@ -opentrack_boilerplate(opentrack-tracker-udp) +otr_module(tracker-udp) diff --git a/x-plane-plugin/CMakeLists.txt b/x-plane-plugin/CMakeLists.txt index 826fe860..abca2d68 100644 --- a/x-plane-plugin/CMakeLists.txt +++ b/x-plane-plugin/CMakeLists.txt @@ -2,7 +2,7 @@ if(LINUX OR APPLE)      set(SDK_XPLANE "" CACHE PATH "Path to X-Plane SDK")      if(SDK_XPLANE) -        opentrack_boilerplate(opentrack-xplane-plugin NO-QT) +        otr_module(xplane-plugin NO-QT)          # probably librt already included          install(FILES ${opentrack-xplane-plugin-c} DESTINATION "${opentrack-doc-src-pfx}/opentrack-xplane-plugin")          target_include_directories(opentrack-xplane-plugin SYSTEM PUBLIC ${SDK_XPLANE}/CHeaders ${SDK_XPLANE}/CHeaders/XPLM) | 
