Skip to content

Commit

Permalink
Put the main file into a subdirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
yuki-koyama committed Aug 28, 2018
1 parent 75e514d commit e36a962
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ cmake_minimum_required(VERSION 3.1)
project(tinycolormap CXX)
set(CMAKE_CXX_STANDARD 11)

install(FILES ${CMAKE_SOURCE_DIR}/tinycolormap.hpp DESTINATION include)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/tinycolormap.hpp DESTINATION include)

add_library(tinycolormap INTERFACE)
target_sources(tinycolormap INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/tinycolormap.hpp)
target_include_directories(tinycolormap INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
target_sources(tinycolormap INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/include/tinycolormap.hpp)
target_include_directories(tinycolormap INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/include)

option(TINYCOLORMAP_BUILD_TOOLS "Build tools" OFF)

Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,16 @@ tinycolormap does not have any dependencies except for C++11 standard library.
## Installation

tinycolormap is a header-only library, so you do not need to compile it. You can use it by
- Adding the path to the cloned tinycolormap repository to your project's include paths, or

- Adding the path to the `include` directory in the cloned tinycolormap repository to your project's include paths, or
- Copying the file `tinycolormap.hpp` to your project (note that tinycolormap consists of only that single file).

If your project is managed by Cmake <https://cmake.org/>, then the `ExternalProject_Add` is useful as tinycolormap provides `CMakeLists.txt` for this purpose.
If your project is managed by Cmake <https://cmake.org/>, `add_subdirectory` or `ExternalProject_Add` commands are useful as tinycolormap provides `CMakeLists.txt` for this purpose.

## Tools (Optional)

This repository includes the following optional tools:

- PNG Exporter: This tool exports all the available colormaps as PNG images.

### Additional Dependency
Expand Down
File renamed without changes.

0 comments on commit e36a962

Please sign in to comment.