serf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1834407 - /serf/trunk/CMakeLists.txt
Date Tue, 26 Jun 2018 08:55:50 GMT
Author: brane
Date: Tue Jun 26 08:55:50 2018
New Revision: 1834407

URL: http://svn.apache.org/viewvc?rev=1834407&view=rev
Log:
* CMakeLists.txt: Using PREFIX as a global variable turns out not to be
   a good idea; CMake generates a bunch of warnings because its internals
   use PREFIX for compiler feature checks, etc.

Modified:
    serf/trunk/CMakeLists.txt

Modified: serf/trunk/CMakeLists.txt
URL: http://svn.apache.org/viewvc/serf/trunk/CMakeLists.txt?rev=1834407&r1=1834406&r2=1834407&view=diff
==============================================================================
--- serf/trunk/CMakeLists.txt (original)
+++ serf/trunk/CMakeLists.txt Tue Jun 26 08:55:50 2018
@@ -30,7 +30,6 @@ message(WARNING
 
 
 # Build options
-option(PREFIX "Installation root directory" OFF)
 option(LIBDIR "Indstall directory for architecture-dependent libraries" OFF)
 option(APR "Path to APR's install area" OFF)
 option(APU "Path to APR-Util's install area" OFF)
@@ -184,16 +183,8 @@ if(CMAKE_COMPILER_IS_GNUCC OR (CMAKE_C_C
 endif()
 
 # Process other build options
-if(PREFIX)
-  set(CMAKE_INSTALL_PREFIX ${PREFIX})
-else()
-  set(PREFIX ${CMAKE_INSTALL_PREFIX})
-endif()
-
 if(LIBDIR)
   message(WARNING "option LIBDIR is not implemented yet")
-else()
-  set(LIBDIR "${PREFIX}/lib")
 endif()
 
 if(DEBUG)
@@ -245,6 +236,10 @@ endif()
 if(NOT WINDOWS)
   # Use a separate variable scope for the substitutions in serf.pc.in.
   function(make_pkgconfig)
+    set(PREFIX ${CMAKE_INSTALL_PREFIX})
+    if(NOT LIBDIR)
+      set(LIBDIR "${PREIFX}/lib")
+    endif()
     set(VERSION ${SERF_VERSION})
     set(MAJOR ${SERF_MAJOR_VERSION})
     set(INCLUDE_SUBDIR "serf-${SERF_MAJOR_VERSION}")



Mime
View raw message