Merge pull request #214 from rolk/214_utils

No programs installed by 'make install'
This commit is contained in:
Atgeirr Flø Rasmussen 2013-03-21 04:58:25 -07:00
commit bf8e306172
2 changed files with 13 additions and 0 deletions

View File

@ -32,6 +32,7 @@ macro (opm_sources opm)
set (TEST_SOURCE_FILES) set (TEST_SOURCE_FILES)
set (TEST_DATA_FILES) set (TEST_DATA_FILES)
set (PUBLIC_HEADER_FILES) set (PUBLIC_HEADER_FILES)
set (PROGRAM_SOURCE_FILES)
# read the list of components from this file; it should set the above # read the list of components from this file; it should set the above
# lists (which are generic names) # lists (which are generic names)
@ -55,6 +56,9 @@ macro (opm_sources opm)
foreach (_file IN LISTS EXAMPLE_SOURCE_FILES) foreach (_file IN LISTS EXAMPLE_SOURCE_FILES)
list (APPEND examples_SOURCES ${PROJECT_SOURCE_DIR}/${_file}) list (APPEND examples_SOURCES ${PROJECT_SOURCE_DIR}/${_file})
endforeach (_file) endforeach (_file)
foreach (_file IN LISTS PROGRAM_SOURCE_FILES)
list (APPEND examples_SOURCES_DIST ${PROJECT_SOURCE_DIR}/${_file})
endforeach (_file)
# identify pre-compile header; if the project is called opm-foobar, # identify pre-compile header; if the project is called opm-foobar,
# then it should be in opm/foobar/opm-foobar-pch.hpp # then it should be in opm/foobar/opm-foobar-pch.hpp

View File

@ -95,6 +95,15 @@ macro (opm_compile_satellites opm satellite excl_all test_regexp)
) )
endif (CMAKE_VERSION VERSION_LESS "2.8.4") endif (CMAKE_VERSION VERSION_LESS "2.8.4")
endif(NOT "${test_regexp}" STREQUAL "") endif(NOT "${test_regexp}" STREQUAL "")
# if this program on the list of files that should be distributed?
# we check by the name of the source file
list (FIND ${satellite}_SOURCES_DIST "${_sat_FILE}" _is_util)
if (NOT (_is_util EQUAL -1))
install (TARGETS ${_sat_NAME} RUNTIME
DESTINATION bin/
)
endif (NOT (_is_util EQUAL -1))
endforeach (_sat_FILE) endforeach (_sat_FILE)
endmacro (opm_compile_satellites opm prefix) endmacro (opm_compile_satellites opm prefix)