1 set (LIBS_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/libs")
2 set (INCLUDE_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include")
3 set (SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
4 set (EC_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/libs/ec/cpp")
7 OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pixmaps/flags_xpm/CountryFlags.h
8 COMMAND ${CMAKE_COMMAND} -DHEADER_FILE="${CMAKE_CURRENT_BINARY_DIR}/pixmaps/flags_xpm/CountryFlags.h" -P ${CMAKE_CURRENT_SOURCE_DIR}/pixmaps/flags_xpm/CMakeLists.txt
9 WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/pixmaps/flags_xpm"
13 OUTPUT ${EC_INCLUDE_DIR}/ECCodes.h
14 COMMAND ${CMAKE_COMMAND} -DHEADER_FILE="${CMAKE_CURRENT_BINARY_DIR}/libs/ec/cpp/ECCodes.h" -P ${CMAKE_CURRENT_SOURCE_DIR}/libs/ec/abstracts/CMakeLists.txt
15 WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/libs/ec/abstracts"
19 OUTPUT ${EC_INCLUDE_DIR}/ECTagTypes.h
20 COMMAND ${CMAKE_COMMAND} -DHEADER_FILE="${CMAKE_CURRENT_BINARY_DIR}/libs/ec/cpp/ECTagTypes.h" -P ${CMAKE_CURRENT_SOURCE_DIR}/libs/ec/abstracts/CMakeLists.txt
21 WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/libs/ec/abstracts"
24 add_custom_target (generate_CountryFlags.h DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/pixmaps/flags_xpm/CountryFlags.h)
25 add_custom_target (generate_ECCodes.h DEPENDS ${EC_INCLUDE_DIR}/ECCodes.h)
26 add_custom_target (generate_ECTagTypes.h DEPENDS ${EC_INCLUDE_DIR}/ECTagTypes.h)
27 set_source_files_properties (${CMAKE_CURRENT_BINARY_DIR}/pixmaps/flags_xpm/CountryFlags.h PROPERTIES GENERATED TRUE)
28 set_source_files_properties (${EC_INCLUDE_DIR}/ECCodes.h PROPERTIES GENERATED TRUE)
29 set_source_files_properties (${EC_INCLUDE_DIR}/ECTagTypes.h PROPERTIES GENERATED TRUE)
30 include (${CMAKE_SOURCE_DIR}/cmake/source-vars.cmake)
33 add_subdirectory (utils)
37 add_subdirectory (webserver)
41 add_subdirectory (skins)
45 if (ENABLE_IP2COUNTRY)
46 set_source_files_properties (${IP2COUNTRY}
47 PROPERTIES COMPILE_FLAGS "-I${CMAKE_CURRENT_BINARY_DIR} -I${CMAKE_CURRENT_SOURCE_DIR}/pixmaps/flags_xpm"
52 add_subdirectory (libs)
56 add_executable (amulecmd
66 target_sources (amulecmd
67 PRIVATE ${CMAKE_SOURCE_DIR}/version.rc
71 target_compile_definitions (amulecmd
75 target_include_directories (amulecmd
79 target_link_libraries (amulecmd
86 target_link_libraries (amulecmd ${LIBBFD})
90 target_link_libraries (amulecmd ${READLINE_LIBRARIES})
93 install (TARGETS amulecmd
94 RUNTIME DESTINATION bin
96 endif (BUILD_AMULECMD)
99 add_executable (amuled
106 target_sources (amuled
107 PRIVATE ${CMAKE_SOURCE_DIR}/version.rc
111 target_compile_definitions (amuled
116 target_include_directories (amuled
120 target_link_libraries (amuled
130 target_link_libraries (amuled
136 target_link_libraries (amuled
141 install (TARGETS amuled
142 RUNTIME DESTINATION bin
155 PRIVATE ${CMAKE_SOURCE_DIR}/version.rc
159 target_compile_definitions (ed2k
160 PRIVATE "USE_STD_STRING"
164 target_link_libraries (ed2k
169 install (TARGETS ed2k
170 RUNTIME DESTINATION bin
174 if (BUILD_MONOLITHIC)
175 add_executable (amule
182 PartFileConvertDlg.cpp
186 target_sources (amule
187 PRIVATE ${CMAKE_SOURCE_DIR}/version.rc
191 target_link_libraries (amule
198 $<$<VERSION_LESS:${wxWidgets_VERSION_STRING},3.1.2>:wxWidgets::ADV>
203 target_link_libraries (amule ${LIBBFD})
207 target_link_libraries (amule
211 set_target_properties (amule
212 PROPERTIES WIN32_EXECUTABLE TRUE
216 install (TARGETS amule
217 RUNTIME DESTINATION bin
219 endif (BUILD_MONOLITHIC)
222 add_executable (amulegui
225 kademlia/utils/UInt128.cpp
230 target_sources (amulegui
231 PRIVATE ${CMAKE_SOURCE_DIR}/version.rc
235 target_compile_definitions (amulegui
239 target_include_directories (amulegui
243 target_link_libraries (amulegui
249 $<$<VERSION_LESS:${wxWidgets_VERSION_STRING},3.1.2>:wxWidgets::ADV>
254 target_link_libraries (amulegui
260 set_target_properties (amulegui
261 PROPERTIES WIN32_EXECUTABLE TRUE
265 install (TARGETS amulegui
266 RUNTIME DESTINATION bin
270 if (NEED_LIB_MULEAPPCOMMON)
271 add_library (muleappcommon STATIC
288 TerminationProcess.cpp
292 target_compile_definitions (muleappcommon
297 target_include_directories (muleappcommon
298 PUBLIC ${amule_BINARY_DIR}
299 PUBLIC ${EC_INCLUDE_DIR}
300 PRIVATE ${INCLUDE_INCLUDE_DIR}
301 PRIVATE ${LIBS_INCLUDE_DIR}
302 PRIVATE ${wxWidgets_INCLUDE_DIRS}
303 PRIVATE ${ZLIB_INCLUDE_DIR}
306 add_dependencies (muleappcommon
308 generate_ECTagTypes.h
312 target_link_libraries (muleappcommon
318 if (NEED_LIB_MULEAPPCORE)
320 bison_target (Parser.cpp
321 ${CMAKE_CURRENT_SOURCE_DIR}/Parser.y
322 ${CMAKE_CURRENT_BINARY_DIR}/Parser.cpp
323 COMPILE_FLAGS "-t -d -v"
326 set (PARSER ${CMAKE_CURRENT_BINARY_DIR}/Parser.cpp)
328 set (PARSER ${CMAKE_CURRENT_SOURCE_DIR}/Parser.cpp)
333 set (FLEX_FLAGS "--header-file=${CMAKE_CURRENT_BINARY_DIR}/Scanner.h")
335 set_source_files_properties (Parser.cpp
336 COMPILE_FLAGS "-I${CMAKE_CURRENT_BINARY_DIR}"
340 flex_target (Scanner.cpp
341 ${CMAKE_CURRENT_SOURCE_DIR}/Scanner.l
342 ${CMAKE_CURRENT_BINARY_DIR}/Scanner.cpp
343 COMPILE_FLAGS "${FLEX_FLAGS}"
346 flex_target (IPFilterScanner.cpp
347 ${CMAKE_CURRENT_SOURCE_DIR}/IPFilterScanner.l
348 ${CMAKE_CURRENT_BINARY_DIR}/IPFilterScanner.cpp
349 COMPILE_FLAGS "-Pyyip"
352 set (SCANNER ${CMAKE_CURRENT_BINARY_DIR}/Scanner.cpp)
353 set (IPFILTERSCANNER ${CMAKE_CURRENT_BINARY_DIR}/IPFilterScanner.cpp)
355 set (SCANNER ${CMAKE_CURRENT_SOURCE_DIR}/Scanner.cpp)
356 set (IPFILTERSCANNER ${CMAKE_CURRENT_SOURCE_DIR}/IPFilterScanner.cpp)
359 add_library (muleappcore STATIC
363 kademlia/kademlia/Entry.cpp
364 kademlia/kademlia/Indexed.cpp
365 kademlia/kademlia/SearchManager.cpp
366 kademlia/routing/RoutingBin.cpp
367 kademlia/utils/UInt128.cpp
377 TerminationProcessAmuleweb.cpp
382 target_compile_definitions (muleappcore
387 target_include_directories (muleappcore
388 PRIVATE ${CMAKE_BINARY_DIR}
389 PRIVATE ${CMAKE_CURRENT_BINARY_DIR}
390 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
391 PRIVATE ${INCLUDE_INCLUDE_DIR}
392 PRIVATE ${LIBS_INCLUDE_DIR}
393 PRIVATE ${wxWidgets_INCLUDE_DIRS}
397 target_include_directories (muleappcore
398 PRIVATE $<TARGET_PROPERTY:UPNP::Shared,INTERFACE_INCLUDE_DIRECTORIES>
402 target_link_libraries (muleappcore
407 if (NEED_LIB_MULEAPPGUI)
408 add_library (muleappgui STATIC
410 extern/wxWidgets/listctrl.cpp
413 EditServerListDlg.cpp
414 FileDetailListCtrl.cpp
424 if (ENABLE_IP2COUNTRY)
425 target_link_libraries (muleappgui
430 target_compile_definitions (muleappgui
434 target_include_directories (muleappgui
435 PRIVATE ${amule_BINARY_DIR}
436 PRIVATE ${INCLUDE_INCLUDE_DIR}
437 PRIVATE ${LIBS_INCLUDE_DIR}
440 target_link_libraries (muleappgui
441 PRIVATE wxWidgets::CORE
444 if (ENABLE_IP2COUNTRY)
445 add_dependencies (muleappgui
446 generate_CountryFlags.h)
450 IF (NEED_LIB_MULESOCKET)
451 add_library (mulesocket STATIC
455 target_compile_definitions (mulesocket
459 target_include_directories (mulesocket
460 PRIVATE ${amule_BINARY_DIR}
461 PUBLIC ${INCLUDE_INCLUDE_DIR}
462 PUBLIC ${LIBS_INCLUDE_DIR}
466 target_include_directories (mulesocket
467 PRIVATE ${Boost_INCLUDE_DIR}
468 PRIVATE ${wxWidgets_INCLUDE_DIRS}
471 target_link_libraries (mulesocket
476 target_link_libraries (mulesocket