aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Kahrs <Juergen.Kahrs@googlemail.com>2013-02-11 09:11:27 +0100
committerJuergen Kahrs <Juergen.Kahrs@googlemail.com>2013-02-11 09:11:27 +0100
commit1eade34854d9bfa858ffd2aa44cd1f5baf5951f8 (patch)
tree869dffc4036fa095658a1bbf681ad2ae51c03864
parent79c0ad1fe45d4f14e21d4f2f984f6b4c7c83fdae (diff)
downloadegawk-1eade34854d9bfa858ffd2aa44cd1f5baf5951f8.tar.gz
egawk-1eade34854d9bfa858ffd2aa44cd1f5baf5951f8.tar.bz2
egawk-1eade34854d9bfa858ffd2aa44cd1f5baf5951f8.zip
Preparations for proper handling of bison, gettext and latex.
-rw-r--r--CMakeLists.txt21
1 files changed, 19 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f67d3d10..d76f834f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -217,6 +217,21 @@ DefineFunctionIfAvailable(mbrtowc HAVE_MBRTOWC)
add_definitions(-D HAVE_STRINGIZE)
add_definitions(-D _Noreturn=)
+find_package(BISON REQUIRED)
+if (${BISON_FOUND} STREQUAL "TRUE")
+ BISON_TARGET(awkgram awkgram.y ${CMAKE_SOURCE_DIR}/awkgram.c)
+endif()
+#http://www.cmake.org/cmake/help/v2.8.10/cmake.html#module:FindGettext
+find_package(Gettext REQUIRED)
+if (GETTEXT_FOUND STREQUAL "TRUE")
+ include_directories(${GETTEXT_INCLUDE_DIR})
+else ()
+ message( FATAL_ERROR "Gettext not found" )
+endif()
+find_package(LATEX)
+include(GNUInstallDirs)
+include(GetPrerequisites)
+
set (EXTRA_LIBS "")
DefineLibraryIfAvailable(m sin "" HAVE_LIBM)
@@ -273,7 +288,7 @@ set (GAWK_SOURCES ${GAWK_SOURCES}
version.c
)
-add_executable (gawk ${GAWK_SOURCES})
+add_executable (gawk ${GAWK_SOURCES} ${BISON_awkgram_OUTPUTS})
target_link_libraries (gawk m ${EXTRA_LIBS})
set(CPACK_PACKAGING_INSTALL_PREFIX /usr)
install(PROGRAMS ${CMAKE_BINARY_DIR}/gawk DESTINATION bin)
@@ -284,7 +299,9 @@ add_subdirectory(extension)
if(NOT ${CMAKE_CROSSCOMPILING} STREQUAL "TRUE")
enable_testing()
add_subdirectory(test)
- add_subdirectory(doc)
+ if (${LATEX_COMPILER})
+ add_subdirectory(doc)
+ endif()
endif()
include(InstallRequiredSystemLibraries)