[Solved]: Cmake and libSensel on OSX

Hello,

I am trying to get the sensel examples to work with cmake…
I installed the SenselLibMac0.8.2.pkg on my system but cmake-based installs do not find the files it installs in /usr/local. could someone help me how to proceed? Thanks!

I tried to do an include_package(libSensel, REQUIRED) to no avail:

I figured it out (I think).
libSensel does not include a findPackage.cmake (or thelike), so I had to write my own based on information I found here.

this is CMakeLists.txt

[...]
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
find_package(Sensel REQUIRED)
[...]
include_directories("${SENSEL_INCLUDE_DIRS}")
target_link_libraries(app ${SENSEL_LIBRARIES})
add_executable(app app.cpp)

this is cmake/findSensel.cmake

FIND_LIBRARY(SENSEL_LIBRARY Sensel
    PATHS /usr/local/lib
    NO_DEFAULT_PATH
)
SET(SENSEL_LIBRARIES ${SENSEL_LIBRARY})
FIND_PATH(SENSEL_INCLUDE_DIR sensel.h
    PATHS /usr/local/include
    NO_DEFAULT_PATH
)
SET(SENSEL_INCLUDE_DIRS ${SENSEL_INCLUDE_DIR})