Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Cmake with gobbledegook #31

Closed
zainmehdi opened this issue Oct 28, 2019 · 0 comments
Closed

Using Cmake with gobbledegook #31

zainmehdi opened this issue Oct 28, 2019 · 0 comments

Comments

@zainmehdi
Copy link

zainmehdi commented Oct 28, 2019

Just in case if anyone is looking to use cmake with this library I was able to compile with the following file

cmake_minimum_required(VERSION 3.5)

project(GATTCHECK LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(PkgConfig REQUIRED)
find_package(Threads REQUIRED)
find_package(realsense2 REQUIRED)

pkg_search_module(GLib REQUIRED glib-2.0)
pkg_search_module(GTK REQUIRED gtk+-3.0)
pkg_search_module(GIO REQUIRED)

include_directories(${GLib_INCLUDE_DIRS}
                    ${GTK_INCLUDE_DIRS}
                    ${GIO_INCLUDE_DIRS})

link_directories(${GLib_LIBRARY_DIRS}
                 ${GTK_LIBRARY_DIRS}
                  ${GIO_LIBRARY_DIRS})

add_definitions(${GTK_CFLAGS_OTHER})

add_executable(GATTCHECK standalone.cpp)
target_link_libraries(GATTCHECK
                      ${GATTCHECK_SOURCE_DIR}/libggk.a
                      ${GLib_LIBRARIES}
                      ${GKT_LIBRARIES}
                      ${GIO_LIBRARIES}
                      ${realsense2_LIBRARY}
                      pthread
                     )

You need to put libggk.a and Gobbledegook.h in the source directory.

@zainmehdi zainmehdi changed the title Using Cmake with gobbledeook Using Cmake with gobbledegook Oct 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant