Skip to content

Commit 559c367

Browse files
committed
cmake: Fix the build when CMAKE_SOURCE_DIR != CMAKE_BINARY_DIR
1 parent b1a313a commit 559c367

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ pkg_check_modules(GLIB2 REQUIRED glib-2.0 gthread-2.0 gmodule-2.0)
8686

8787
add_custom_target(
8888
libdill_s
89+
ALL
8990
COMMAND ./autogen.sh
9091
COMMAND ./configure --enable-static --disable-shared
9192
COMMAND make
@@ -95,9 +96,9 @@ add_custom_target(
9596
if (NOT (${CMAKE_BINARY_DIR} STREQUAL ${CMAKE_SOURCE_DIR}))
9697
add_custom_target(
9798
libdill_source
99+
ALL
98100
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/vendor/sustrik/libdill
99-
COMMAND lndir ${CMAKE_SOURCE_DIR}/vendor/sustrik/libdill
100-
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/vendor/sustrik/libdill
101+
COMMAND cd ${CMAKE_BINARY_DIR}/vendor/sustrik/libdill && lndir ${CMAKE_SOURCE_DIR}/vendor/sustrik/libdill
101102
COMMENT "Preparing the source of libdill")
102103
add_dependencies(libdill_s libdill_source)
103104
endif()

0 commit comments

Comments
 (0)