@@ -120,48 +120,28 @@ endif()
120
120
121
121
find_package (PkgConfig )
122
122
pkg_check_modules (GLIB2 REQUIRED glib-2.0 gthread-2.0 gmodule-2.0 )
123
+ pkg_check_modules (DILL REQUIRED libdill )
123
124
124
- add_custom_target (
125
- libdill_s
126
- ALL
127
- COMMAND ./autogen.sh
128
- COMMAND ./configure --enable-static --disable-shared
129
- COMMAND make
130
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR} /vendor/sustrik/libdill
131
- COMMENT "Building libdill" )
132
-
133
- if (NOT (${CMAKE_BINARY_DIR} STREQUAL ${CMAKE_SOURCE_DIR} ))
134
- add_custom_target (
135
- libdill_source
136
- ALL
137
- COMMAND mkdir -p ${CMAKE_BINARY_DIR} /vendor/sustrik/libdill
138
- COMMAND cd ${CMAKE_BINARY_DIR} /vendor/sustrik/libdill && lndir ${CMAKE_SOURCE_DIR} /vendor/sustrik/libdill
139
- COMMENT "Preparing the source of libdill" )
140
- add_dependencies (libdill_s libdill_source )
141
- endif ()
142
-
143
- set (CMAKE_LIBRARY_PATH "" )
144
- set (CMAKE_INCLUDE_PATH "" )
145
125
include_directories (AFTER
146
- ${CMAKE_SOURCE_DIR} /vendor/sustrik/libdill
126
+ ${DILL_INCLUDE_DIRS}
147
127
${GLIB2_INCLUDE_DIRS} )
148
128
149
- add_definitions (-DLOG_DOMAIN= "gridinit" )
129
+ link_directories (
130
+ ${DILL_LIBRARY_DIRS}
131
+ ${GLIB2_LIBRARY_DIRS} )
150
132
151
- include_directories (BEFORE ${CMAKE_SOURCE_DIR} /main )
133
+ include_directories (BEFORE
134
+ ${CMAKE_SOURCE_DIR} /main )
135
+
136
+ add_definitions (-DLOG_DOMAIN= "gridinit" )
152
137
153
138
add_executable (gridinit
154
139
main/gridinit.c
155
140
main/children.c
156
141
main/limits.c
157
142
main/uid.c
158
143
main/utils.c )
159
- target_link_libraries (gridinit
160
- ${GLIB2_LIBRARIES}
161
- ${CMAKE_BINARY_DIR} /vendor/sustrik/libdill/.libs/libdill.a
162
- -pthread -lrt )
163
- add_dependencies (gridinit
164
- libdill_s )
144
+ target_link_libraries (gridinit ${GLIB2_LIBRARIES} ${DILL_LIBRARIES} )
165
145
166
146
167
147
add_executable (gridinit_cmd
0 commit comments