Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
vsoftco committed Nov 30, 2023
1 parent 692544e commit bd0075c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ jobs:
if [ "$RUNNER_OS" == "Windows" ]; then
cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-DCMAKE_TOOLCHAIN_FILE=./vcpkg/scripts/buildsystems/vcpkg.cmake \
-DSTAQ_INSTALL_SOURCES=ON
-DINSTALL_SOURCES=ON
else
cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-DSTAQ_INSTALL_SOURCES=ON
-DINSTALL_SOURCES=ON
fi
- name: Build staq
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ endif ()
#### Installation (binaries)
install(TARGETS ${COMPILER} DESTINATION ${CMAKE_INSTALL_BINDIR})

option(STAQ_INSTALL_SOURCES "Enable staq's source code installation" OFF)
option(INSTALL_SOURCES "Enable staq's source code installation" OFF)

#### Installation (source)
if (STAQ_INSTALL_SOURCES)
if (INSTALL_SOURCES)
set(STAQ_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include/${PROJECT_NAME}")
install(DIRECTORY include/ DESTINATION ${STAQ_INSTALL_DIR})
install(DIRECTORY qasmtools/include/ DESTINATION ${STAQ_INSTALL_DIR})
Expand All @@ -122,7 +122,7 @@ if (NOT TARGET uninstall)
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
if (NOT MSVC)
if (STAQ_INSTALL_SOURCES)
if (INSTALL_SOURCES)
add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
COMMAND ${CMAKE_COMMAND} -E remove_directory "${CMAKE_INSTALL_PREFIX}/lib/cmake/${PROJECT_NAME}"
Expand Down
4 changes: 2 additions & 2 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ To be able to install staq's source code in addition to the binaries, configure
the system with

```shell
cmake -B build -DSTAQ_INSTALL_SOURCES=ON
cmake -B build -DINSTALL_SOURCES=ON
```

**Important**: If you want to build the grid synth tools `staq_grid_synth`
Expand Down Expand Up @@ -94,7 +94,7 @@ or in an Administrator Command Prompt (Windows)
cmake --build build --target (un)install
```

If you configured the system with `-DSTAQ_INSTALL_SOURCES=ON`, staq's source
If you configured the system with `-DINSTALL_SOURCES=ON`, staq's source
code will be installed in `/usr/local/include/staq` (UNIX/UNIX-like systems), or
in `C:\Program Files (x86)\staq` on Windows systems. The paths may differ on
your system. To use staq's source code, precede all include paths by `staq` in
Expand Down
2 changes: 1 addition & 1 deletion cmake/staq_uninstall.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ endforeach()

if(NOT "@MSVC@")
message(STATUS "Removing @CMAKE_INSTALL_PREFIX@/lib/cmake/@PROJECT_NAME@")
if("@STAQ_INSTALL_SOURCES@")
if("@INSTALL_SOURCES@")
message(STATUS "Removing @STAQ_INSTALL_DIR@")
endif()
else()
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ USER sq
WORKDIR /home/sq
RUN git clone --depth 1 --branch main https://github.com/softwareqinc/staq
WORKDIR /home/sq/staq
RUN cmake -B build -DSTAQ_INSTALL_SOURCES=ON && \
RUN cmake -B build -DINSTALL_SOURCES=ON && \
cmake --build build --target all --parallel 4 && \
sudo cmake --build build --target install
USER sq
Expand Down

0 comments on commit bd0075c

Please sign in to comment.