ambrop7 14 éve
szülő
commit
3fb266dfc1
2 módosított fájl, 4 hozzáadás és 8 törlés
  1. 3 1
      CMakeLists.txt
  2. 1 7
      examples/CMakeLists.txt

+ 3 - 1
CMakeLists.txt

@@ -181,6 +181,7 @@ install(
 # reset variables indicating whether we're building various libraries,
 # and set them in the respective CMakeLists files. This is used to disable
 # building examples and tests which require libraries that are not available.
+set(BUILDING_SECURITY 0)
 set(BUILDING_DHCPCLIENT 0)
 set(BUILDING_BKIO 0)
 set(BUILDING_PREDICATE 0)
@@ -193,12 +194,13 @@ add_subdirectory(system)
 add_subdirectory(flow)
 add_subdirectory(flowextra)
 if (OpenSSL_FOUND)
+    set(BUILDING_SECURITY 1)
     add_subdirectory(security)
 endif ()
 if (NSS_FOUND)
     add_subdirectory(nspr_support)
 endif ()
-if (BUILD_CLIENT OR BUILD_NCD)
+if (BUILD_CLIENT OR BUILDING_SECURITY)
     set(BUILDING_THREADWORK 1)
     add_subdirectory(threadwork)
 endif ()

+ 1 - 7
examples/CMakeLists.txt

@@ -11,22 +11,16 @@ endif ()
 add_executable(fairqueue_test fairqueue_test.c)
 target_link_libraries(fairqueue_test system flow)
 
-if (LIBCRYPTO_LIBRARIES)
+if (BUILDING_SECURITY)
     add_executable(fairqueue_test2 fairqueue_test2.c)
     target_link_libraries(fairqueue_test2 system flow security)
-endif ()
 
-if (LIBCRYPTO_LIBRARIES)
     add_executable(bheap_test bheap_test.c)
     target_link_libraries(bheap_test security)
-endif ()
 
-if (LIBCRYPTO_LIBRARIES)
     add_executable(bavl_test bavl_test.c)
     target_link_libraries(bavl_test security)
-endif ()
 
-if (LIBCRYPTO_LIBRARIES)
     add_executable(bencryption_bench bencryption_bench.c)
     target_link_libraries(bencryption_bench system security)
 endif ()