Skip to content

Commit c01b84d

Browse files
committed
Merge branch 'develop'
2 parents 4eeb3a2 + 8fa1171 commit c01b84d

File tree

2 files changed

+7
-17
lines changed

2 files changed

+7
-17
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@ To install Cuttlefish from the source, you may use the following:
6161
```bash
6262
git clone https://github.com/COMBINE-lab/cuttlefish.git
6363
cd cuttlefish && mkdir build && cd build
64-
cmake ..
64+
cmake -DCMAKE_INSTALL_PREFIX=../ ..
6565
make -j 8 install
6666
cd ..
6767
```
6868

69-
You may replace `8` in `make -j 8 install` with the preferred count for threads to use in the installation process.
69+
You may replace `8` in `make -j 8` with the preferred count for threads to use in the installation process.
7070

71-
This compilation process installs Cuttlefish in a default sub-directory named `bin`, inside the project root directory. To specify a different installation directory, its path may be passed as the value of `-DCMAKE_INSTALL_PREFIX` with the `cmake` command, i.e. you may use `cmake -DCMAKE_INSTALL_PREFIX=custome-path/ ..` .
71+
This compilation process installs Cuttlefish in a sub-directory named `bin`, inside the project root directory. To specify a different installation directory, its path may be passed as the value of `-DCMAKE_INSTALL_PREFIX` with the `cmake` command, i.e. you may use `cmake -DCMAKE_INSTALL_PREFIX=custom_path/ ..` . Then the installed Cuttlefish executable will be found in `custom_path/bin/`. Skipping `-DCMAKE_INSTALL_PREFIX` entirely will install Cuttlefish in `/usr/local/bin`, for which `sudo` access might be required (i.e. `sudo make -j 8 install`).
7272

7373
## Usage
7474

src/CMakeLists.txt

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -65,21 +65,11 @@ target_link_libraries(${PROJECT_NAME} PRIVATE core)
6565
target_compile_options(${PROJECT_NAME} PRIVATE ${WARNING_FLAGS} ${SUPPRESS_WARNING_FLAGS} ${OPTIMIZE_FLAGS})
6666

6767

68-
# Set the parent directory for the target binaries inside the "installation directory". The
69-
# installation directory is set to `/usr/local` by default. If it's set there, i.e. the user
70-
# have not passed any other value for such, then the parent installation directory is set to
71-
# a default (`bin`) directory at the top level of the source tree. To specify a different parent
72-
# installation directory, pass its path as the value of the `-DCMAKE_INSTALL_PREFIX` with the
73-
# `cmake` command.
74-
75-
set(DEFAULT_INSTALL_DIR ${CMAKE_SOURCE_DIR}/bin) # Set our default installation directory as a `bin` directory inside the top level of the source tree.
76-
set(INSTALL_DIR .) # Set the installation directory to what CMake has recieved, i.e. either the system default or the user-provided one.
77-
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) # If it's set to the system default, then set it to our defined default directory.
78-
set(INSTALL_DIR ${DEFAULT_INSTALL_DIR})
79-
endif()
80-
68+
# Set the installation directory. The parent directory is `/usr/local/` by default, and the
69+
# user may set it to a different path by passing a value for `CMAKE_INSTALL_PREFIX`. The target
70+
# executable is installed inside a sub-directory named `bin` within the parent directory.
8171
install(TARGETS ${PROJECT_NAME}
82-
DESTINATION ${INSTALL_DIR}
72+
DESTINATION bin
8373
)
8474

8575

0 commit comments

Comments
 (0)