Skip to content

Commit

Permalink
Test for ftw.h in CMake.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rémy Oudompheng committed Sep 6, 2010
1 parent 50530d9 commit 3e95567
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1 +1,2 @@
*~
build
5 changes: 4 additions & 1 deletion CMakeLists.txt
Expand Up @@ -7,7 +7,9 @@ PROJECT(mathkaba)

# package version
SET(MATHKABA_VERSION "0.2.2")
configure_file(config.h.cmake config.h)

Include(CheckIncludeFile)
check_include_file(ftw.h HAVE_FTW_H)

# utilities
find_program(XXD xxd)
Expand All @@ -21,6 +23,7 @@ pkg_check_modules(GTKMM REQUIRED gtkmm-2.4>=2.12)
include_directories(${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/parser)
link_directories(${CMAKE_BINARY_DIR}/parser)

configure_file(config.h.cmake config.h)
add_subdirectory(parser)
add_subdirectory(src)

6 changes: 5 additions & 1 deletion parser/CMakeLists.txt
@@ -1,4 +1,8 @@
include_directories(${GLIBMM_INCLUDE_DIRS})
if(${HAVE_FTW_H})
add_definitions(-DHAVE_FTW_H)
else()
include_directories(${GLIBMM_INCLUDE_DIRS})
endif()

add_library(parser
library.cpp library.hpp
Expand Down
1 change: 1 addition & 0 deletions parser/library.cpp
Expand Up @@ -20,6 +20,7 @@
*/

#include "library.hpp"
#include <config.h>
#include <iostream>

#ifdef HAVE_FTW_H
Expand Down

0 comments on commit 3e95567

Please sign in to comment.