trunk: fixed cmake config so as to be able to link opj_jpip_server with FCGI.
authorAntonin Descampe <antonin@gmail.com>
Wed, 30 Oct 2013 08:59:23 +0000 (08:59 +0000)
committerAntonin Descampe <antonin@gmail.com>
Wed, 30 Oct 2013 08:59:23 +0000 (08:59 +0000)
CMakeLists.txt
src/CMakeLists.txt
src/bin/jpip/CMakeLists.txt

index 3b86f061b9b2d4d2cb19c6b35b0594e6821a2dfa..72f985f6596a504df53441f71f495bff5e90557c 100644 (file)
@@ -213,7 +213,15 @@ OPJ_TEST_LARGE_FILES(OPJ_HAVE_LARGEFILES)
 
 #-----------------------------------------------------------------------------
 # Build Library
-add_subdirectory(src)
+if(BUILD_JPIP_SERVER)
+  find_package(CURL REQUIRED)
+  find_package(FCGI REQUIRED)
+  find_package(Threads REQUIRED)
+  if(NOT CMAKE_USE_PTHREADS_INIT)
+    message(FATAL_ERROR "Only pthread are supported")
+  endif()
+endif()
+add_subdirectory(src/lib)
 
 #-----------------------------------------------------------------------------
 # Build Applications
index 673843ec99747a52bdefc56fc1d66c47ab443f2b..87526cfc494bfda8e961c160874a7aaebf52cf71 100644 (file)
@@ -1,12 +1,12 @@
 # required dep for server:
-if(BUILD_JPIP_SERVER)
-  find_package(CURL REQUIRED)
-  find_package(FCGI REQUIRED)
-  find_package(Threads REQUIRED)
-  if(NOT CMAKE_USE_PTHREADS_INIT)
-    message(FATAL_ERROR "Only pthread are supported")
-  endif()
-endif()
+#if(BUILD_JPIP_SERVER)
+#  find_package(CURL REQUIRED)
+#  find_package(FCGI REQUIRED)
+#  find_package(Threads REQUIRED)
+#  if(NOT CMAKE_USE_PTHREADS_INIT)
+#    message(FATAL_ERROR "Only pthread are supported")
+#  endif()
+#endif()
 
-add_subdirectory(lib)
+#add_subdirectory(lib)
 #add_subdirectory(bin)
index 45f0007bca301a662efcfc30e9a535de5008639f..9404c11106834c824586ef5d44d71c74f6d38cef 100644 (file)
@@ -23,7 +23,7 @@ if(BUILD_JPIP_SERVER)
 
   # Build executable
   add_executable(opj_server ${OPJ_SERVER_SRCS})
-  target_link_libraries(opj_server openjpip_server)
+  target_link_libraries(opj_server ${FCGI_LIBRARIES} openjpip_server)
   set_property(
     TARGET opj_server
     APPEND PROPERTY