Skip to content

Commit

Permalink
install some scripts even when BUILD_EXECUTABLES=OFF
Browse files Browse the repository at this point in the history
some scripts do not depend on STIR executables, and are
useful elsewhere.

Fixes #894
  • Loading branch information
KrisThielemans committed May 7, 2022
1 parent 6852037 commit a073daa
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
21 changes: 12 additions & 9 deletions scripts/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,37 +1,40 @@
#
#
# Copyright 2011-07-01 - 2011 Kris Thielemans
# Copyright 2022 University College London
# This file is part of STIR.
#
# SPDX-License-Identifier: Apache-2.0
#
# See STIR/LICENSE.txt for details

# cmake file declaring all tests in this subdirectory

set(dir scripts)

set(dir_scripts ${dir}_SCRIPTS)
#set(dir_scripts ${dir}_SCRIPTS)

set(${dir_scripts}
stir_subtract
stir_divide
count
set(dir_scripts1}
stir_subtract
stir_divide
stir_print_voxel_sizes.sh
estimate_scatter.sh
zoom_att_image.sh
get_num_voxels.sh
create_fdef_from_listmode.sh
)
# scripts that don't use stir utilities and might be useful from python etc
set(dir_scripts2
count
force_view_offset_to_zero.sh
)



#include(stir_test_exe_targets)

# only install if executables are installed as well, as the scripts need them
if (BUILD_EXECUTABLES)
install(PROGRAMS ${${dir_scripts}} DESTINATION bin)
install(PROGRAMS ${dir_scripts1} DESTINATION bin)
endif()

install(PROGRAMS ${dir_scripts2} DESTINATION bin)

add_subdirectory(IO)
7 changes: 2 additions & 5 deletions scripts/IO/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#
# See STIR/LICENSE.txt for details

# cmake file declaring all tests in this subdirectory

set(dir scripts_IO)

Expand All @@ -20,7 +19,5 @@ set(${dir_scripts}

#include(stir_test_exe_targets)

# only install if executables are installed as well, as the scripts need them
if (BUILD_EXECUTABLES)
install(PROGRAMS ${${dir_scripts}} DESTINATION bin)
endif()
# These don't need STIR executables, so always install
install(PROGRAMS ${${dir_scripts}} DESTINATION bin)

0 comments on commit a073daa

Please sign in to comment.