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

Use pkg-config to find glib and igraph #23

Merged
merged 2 commits into from
Dec 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ endif()
## cmake module path is used for both main and tests
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/" ${CMAKE_MODULE_PATH})

include(FindPkgConfig)

## dependencies
find_package(RT REQUIRED)
find_package(M REQUIRED)
find_package(IGRAPH REQUIRED)
find_package(GLIB REQUIRED)

pkg_check_modules(IGRAPH REQUIRED igraph)
pkg_check_modules(GLIB REQUIRED glib-2.0)

## recurse our project tree
add_subdirectory(${CMAKE_SOURCE_DIR}/src/)
Expand Down
135 changes: 0 additions & 135 deletions cmake/FindGLIB.cmake

This file was deleted.

81 changes: 0 additions & 81 deletions cmake/FindIGRAPH.cmake

This file was deleted.

2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## build the tgen binary
include_directories(AFTER src/ ${RT_INCLUDES} ${M_INCLUDES} ${GLIB_INCLUDES} ${IGRAPH_INCLUDES})
include_directories(AFTER src/ ${RT_INCLUDES} ${M_INCLUDES} ${GLIB_INCLUDE_DIRS} ${IGRAPH_INCLUDE_DIRS})

## build as position-independent so it can run in Shadow
add_compile_options(-std=gnu11 -fPIC -fno-omit-frame-pointer -ggdb)
Expand Down
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## build the mmodel test binary

include_directories(AFTER ../src/ ${M_INCLUDES} ${GLIB_INCLUDES} ${IGRAPH_INCLUDES})
include_directories(AFTER ../src/ ${M_INCLUDES} ${GLIB_INCLUDE_DIRS} ${IGRAPH_INCLUDE_DIRS})

## build as position-independent so it can run in Shadow
add_definitions(-D_GNU_SOURCE)
Expand Down