summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Schubert <feartohell@seznam.cz>2015-05-11 19:43:18 +0200
committerAdam Schubert <feartohell@seznam.cz>2015-05-11 19:43:18 +0200
commita62f29ea4b7edd61bb49e9a82761d6686fd81fc0 (patch)
tree505534ef9885fc9c240b4209802f6ac385437849
parentb07fc3b3a6452f5cb20c00eba6a70762079bb9fd (diff)
downloadlibrsync-a62f29ea4b7edd61bb49e9a82761d6686fd81fc0.tar.gz
Use detected perl bin path
-rw-r--r--CMakeLists.txt9
1 files changed, 5 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a1386df..972dcda 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -103,7 +103,9 @@ message (STATUS "SITE_NAME = ${SITE_NAME}")
# Find POPT
find_package(POPT REQUIRED)
-include_directories(${POPT_INCLUDE_DIRS})
+if ( POPT_FOUND )
+ include_directories(${POPT_INCLUDE_DIRS})
+endif ( POPT_FOUND )
# Find BZIP
find_package (BZip2 REQUIRED)
@@ -115,9 +117,8 @@ if (BZIP2_FOUND)
endif (BZIP2_FOUND)
# Find Perl
-find_package (Perl)
+find_package (Perl REQUIRED)
if (PERL_FOUND)
- message (STATUS "Found Perl")
message (STATUS "PERL_EXECUTABLE = ${PERL_EXECUTABLE}")
endif (PERL_FOUND)
@@ -142,7 +143,7 @@ if(DOXYGEN_FOUND)
endif(DOXYGEN_FOUND)
# Generate prototab.c/h
-execute_process(COMMAND perl "${CMAKE_SOURCE_DIR}/src/mkprototab.pl" "${CMAKE_SOURCE_DIR}/src/prototab.c" "${CMAKE_SOURCE_DIR}/src/prototab.h")
+execute_process(COMMAND ${PERL_EXECUTABLE} "${CMAKE_SOURCE_DIR}/src/mkprototab.pl" "${CMAKE_SOURCE_DIR}/src/prototab.c" "${CMAKE_SOURCE_DIR}/src/prototab.h")
# Testing
# build testsuite