blob: 2fb0cae451ffaaa56857e8bda5b429f96f69b868 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 30008d6..c9f1912 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,10 +23,11 @@ ENDIF(NOT WIN32)
ADD_SUBDIRECTORY(avida-core)
# Default location for installed software/configs/ docs is the build directory.
+IF(NOT CMAKE_INSTALL_PREFIX)
SET(CMAKE_INSTALL_PREFIX
"${PROJECT_BINARY_DIR}"
CACHE PATH
"Install path prefix, prepended onto install directories."
FORCE
)
-
+ENDIF(NOT CMAKE_INSTALL_PREFIX)
diff --git a/avida-core/CMakeLists.txt b/avida-core/CMakeLists.txt
index d9d063e..30c4f6a 100644
--- a/avida-core/CMakeLists.txt
+++ b/avida-core/CMakeLists.txt
@@ -12,13 +12,14 @@ ENDIF(COMMAND cmake_policy)
# PROJECT_BINARY_DIR, since the project didn't exist yet.
# Default location for installed software/configs/ docs is the build directory.
+IF(NOT CMAKE_INSTALL_PREFIX)
SET(CMAKE_INSTALL_PREFIX
"${PROJECT_BINARY_DIR}"
CACHE PATH
"Install path prefix, prepended onto install directories."
FORCE
)
-
+ENDIF(NOT CMAKE_INSTALL_PREFIX)
# Final software is built directly into the work subdirectory.
SET(EXECUTABLE_OUTPUT_PATH
"${PROJECT_BINARY_DIR}/bin"
diff --git a/libs/tcmalloc-1.4/CMakeLists.txt b/libs/tcmalloc-1.4/CMakeLists.txt
index 59f8f1a..54873b1 100644
--- a/libs/tcmalloc-1.4/CMakeLists.txt
+++ b/libs/tcmalloc-1.4/CMakeLists.txt
@@ -3,13 +3,14 @@ PROJECT(TCMALLOC CXX)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
# Default location for installed software/configs/ docs is the build directory.
+IF(NOT CMAKE_INSTALL_PREFIX)
SET(CMAKE_INSTALL_PREFIX
"${PROJECT_BINARY_DIR}"
CACHE PATH
"Install path prefix, prepended onto install directories."
FORCE
)
-
+ENDIF(NOT CMAKE_INSTALL_PREFIX)
# Final software is built directly into the work subdirectory.
SET(EXECUTABLE_OUTPUT_PATH
"${PROJECT_BINARY_DIR}/bin"
|