Commits

Shlomi Fish committed 65739ba

Out of source "cmake .." build is successful.

(Finally).

Comments (0)

Files changed (4)

 
 MACRO(RUN_POD2MAN TARGET_NAME BASE_SOURCE BASE_DEST SECTION CENTER RELEASE)
     SET (DEST "${CMAKE_CURRENT_BINARY_DIR}/${BASE_DEST}")
-    SET (SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/${BASE_SOURCE}")
+    IF (POD2MAN_SOURCE_IS_IN_BINARY)
+        SET (SOURCE "${CMAKE_CURRENT_BINARY_DIR}/${BASE_SOURCE}")
+    ELSE (POD2MAN_SOURCE_IS_IN_BINARY)
+        SET (SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/${BASE_SOURCE}")
+    ENDIF (POD2MAN_SOURCE_IS_IN_BINARY)
+    # It is null by default.
+    SET (POD2MAN_SOURCE_IS_IN_BINARY )
     SET(PATH_PERL ${PERL_EXECUTABLE})
     ADD_CUSTOM_COMMAND(
         OUTPUT "${DEST}"

src/cmake/pod2man-wrapper.pl

 my $dir = tempdir( CLEANUP => 1);
 
 my $pod = "$dir/Hoola.pod";
-copy($src, $pod); 
+
+if (! -e $src)
+{
+    die "Cannot find '$src'";
+}
+copy($src, $pod);
 
 if(
 system(

src/wml_backend/p3_eperl/CMakeLists.txt

     PROPERTIES OUTPUT_NAME "wml_p3_${EXE}"
 )
 
+SET (POD_PATH  "${CMAKE_CURRENT_SOURCE_DIR}/eperl.pod")
 ADD_CUSTOM_COMMAND(
-    OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/eperl.pod"
+    OUTPUT "${POD_PATH}"
     COMMAND "${PERL_EXECUTABLE}"
     ARGS "${CMAKE_CURRENT_SOURCE_DIR}/eperl-pod-preproc.pl"
         "--input" "${CMAKE_CURRENT_SOURCE_DIR}/eperl.proto.pod"
-        "--output" "${CMAKE_CURRENT_BINARY_DIR}/eperl.pod"
+        "--output" "${POD_PATH}"
         "--versionfrom" "${CMAKE_CURRENT_SOURCE_DIR}/eperl_version.c"
     DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/eperl-pod-preproc.pl" "${CMAKE_CURRENT_SOURCE_DIR}/eperl.proto.pod" "${CMAKE_CURRENT_SOURCE_DIR}/eperl_version.c"
 )
 
 ADD_CUSTOM_TARGET(
     "eperl_pod_preproc" ALL
-    DEPENDS "eperl.pod"
+    DEPENDS "${POD_PATH}"
 )
 
 INST_RENAME_POD2MAN( "eperl_pod" "eperl.pod" "eperl" "1" "wml_p3_eperl")

src/wml_backend/p9_slice/CMakeLists.txt

 
 SET(INST_BASE "wml_p9_${BASENAME}")
 
+SET(POD2MAN_SOURCE_IS_IN_BINARY 1)
 INST_RENAME_POD2MAN(
     "${BASENAME}_pod" "${destbase}" "${BASENAME}" "1" "${INST_BASE}"
 )
+
 INSTALL(
     PROGRAMS "${dest}"
     DESTINATION "${WML_LIBEXE_DIR}"
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.