Commit 49ae4ec8 authored by Hans-Nikolai Viessmann's avatar Hans-Nikolai Viessmann
Browse files

Merge branch 'develop' into 'master'

Properly handle runtime includes when packaging

See merge request !33
parents 468a79d7 6dd271f7
......@@ -171,7 +171,7 @@ ENDMACRO ()
# Create install-<component> target for all the existing components.
ADD_INSTALL_TARGET ("applications" sac2c sac4c sac2tex "${PROJECT_BINARY_DIR}/saccc")
ADD_INSTALL_TARGET ("config" "${SAC2CRC_BUILD_CONF}")
ADD_INSTALL_TARGET ("headers" sac2cShared)
ADD_INSTALL_TARGET ("headers" sac_h)
ADD_INSTALL_TARGET ("libraries" sac2cShared runtime_libraries)
ADD_INSTALL_TARGET ("rtapplications" runtime_libraries)
ADD_INSTALL_TARGET ("sources")
......@@ -192,11 +192,6 @@ XINSTALL (PROGRAMS "${PROJECT_BINARY_DIR}/saccc"
RENAME "saccc${BUILD_TYPE_POSTFIX}"
COMPONENT applications)
# install include files
XINSTALL (DIRECTORY "${PROJECT_SOURCE_DIR}/include/"
DESTINATION "${INCPATH_INSTALL}"
COMPONENT headers)
# We need to install the runtime libraries and sacprelude into a directory
# hiearchy that is different from the `local' hiearchy. Under out local `lib/' we
# have the 'prelude' directory and then one or more other directories - these are
......
......@@ -112,17 +112,18 @@ FOREACH (type ${BUILDTYPELIST})
ADD_SAC2C_BUILD (${type})
ENDFOREACH ()
# TODO (hans): this is buggy when building dirty...
# TODO (hans): this is buggy when building dirty as we can't stop this from running.
ADD_CUSTOM_TARGET (generic-symlinks ALL
COMMAND ${CMAKE_COMMAND} -E create_symlink "sac2c_p" "bin/sac2c"
COMMAND ${CMAKE_COMMAND} -E create_symlink "sac4c_p" "bin/sac4c"
COMMAND ${CMAKE_COMMAND} -E create_symlink "sac2tex_p" "bin/sac2tex"
COMMAND ${CMAKE_COMMAND} -E create_symlink "saccc_p" "bin/saccc"
COMMAND ${CMAKE_COMMAND} -E create_symlink "csimt_p" "bin/csimt"
COMMAND ${CMAKE_COMMAND} -E create_symlink "csima_p" "bin/csima"
COMMAND ${CMAKE_COMMAND} -E make_directory "${PROJECT_BINARY_DIR}/toplevel/symlinks/${CMAKE_INSTALL_PREFIX}/bin"
COMMAND ${CMAKE_COMMAND} -E create_symlink "sac2c_p" "sac2c"
COMMAND ${CMAKE_COMMAND} -E create_symlink "sac4c_p" "sac4c"
COMMAND ${CMAKE_COMMAND} -E create_symlink "sac2tex_p" "sac2tex"
COMMAND ${CMAKE_COMMAND} -E create_symlink "saccc_p" "saccc"
COMMAND ${CMAKE_COMMAND} -E create_symlink "csimt_p" "csimt"
COMMAND ${CMAKE_COMMAND} -E create_symlink "csima_p" "csima"
DEPENDS ${SAC_TARGETS}
COMMENT "Creating Genereic Symlinks"
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/toplevel/symlinks/${CMAKE_INSTALL_PREFIX})
COMMENT "Creating generic symlinks"
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/toplevel/symlinks/${CMAKE_INSTALL_PREFIX}/bin)
# create symbolic links to binaries
# XXX(hans) we should not do this for distributable packages
......
......@@ -174,7 +174,12 @@ ADD_CUSTOM_COMMAND (
)
ADD_CUSTOM_TARGET (sac_h ALL DEPENDS ${SAC_H} ${RUNTIME_HEADERS_DONE} ${M4_HEADERS_DONE} ${LIBSAC_HEADERS_DONE})
XINSTALL (FILES "${SAC_H}" DESTINATION "${INCPATH_INSTALL}" COMPONENT headers)
# install include files
XINSTALL (DIRECTORY "${PROJECT_BINARY_DIR}/include/runtime"
DESTINATION "${INCPATH_INSTALL}"
COMPONENT headers)
XINSTALL (FILES "${SAC_H}"
DESTINATION "${INCPATH_INSTALL}"
COMPONENT headers)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment