Commit 2209824d by Sebastian Eichelbaum

[CHANGE #199] the header now gets copied to include dir after install.

parent 6eb98ff0
......@@ -70,6 +70,11 @@ SETUP_LIB_INSTALL( ${LibName} ${OW_LIBRARY_DIR_RELATIVE} "CORE" )
# Core contains the headers which are needed for any developer release. Install them.
# NOTE: do not use ${TARGET_H_FILES}. The command requires a list
SETUP_DEV_INSTALL( ${LibName} ${OW_LIBRARY_DIR_RELATIVE} TARGET_H_FILES "include/openwalnut/core" "CORE_DEV" )
# Install the header too
INSTALL( FILES ${OW_VERSION_HEADER}
DESTINATION "include/openwalnut/core"
COMPONENT "CORE_DEV"
)
# The core does also provide some nice pkg-config file. Set this up and configure it to contain the correct install prefix
SETUP_CONFIGURED_FILE( "core-dev" "lib/pkgconfig/openwalnut.pc" "CORE_DEV" )
......
......@@ -44,7 +44,7 @@
#include "WROIManager.h"
#include "WSelectionManager.h"
#include "WVersion.h" // NOTE: this file is auto-generated by CMAKE
#include "core/WVersion.h" // NOTE: this file is auto-generated by CMAKE
/**
* Used for program wide access to the kernel.
......
......@@ -37,7 +37,7 @@
#include "core/common/WSegmentationFault.h"
#include "qt4/WQt4Gui.h"
#include "WVersion.h" // NOTE: this file is auto-generated by CMAKE
#include "core/WVersion.h" // NOTE: this file is auto-generated by CMAKE
/**
* \mainpage OpenWalnut Inline Documentation
......
......@@ -52,7 +52,7 @@
#include <QtWebKit/QWebView>
#endif
#include "WVersion.h" // NOTE: this file is auto-generated by CMAKE
#include "core/WVersion.h" // NOTE: this file is auto-generated by CMAKE
#include "../icons/WIcons.xpm"
#include "controlPanel/WPropertyBoolWidget.h"
......
......@@ -30,8 +30,6 @@ FIND_LIBRARY( OPENCL_LIBRARY NAMES OpenCL PATH
/usr/local/cuda/lib
)
message( STATUS ${OPENCL_CPP_INCLUDE_DIR} )
SET( OPENCL_FOUND FALSE )
IF ( OPENCL_INCLUDE_DIR AND OPENCL_CPP_INCLUDE_DIR AND OPENCL_LIBRARY )
SET( OPENCL_FOUND TRUE )
......
......@@ -61,13 +61,15 @@ ENDIF()
#
# ---------------------------------------------------------------------------------------------------------------------------------------------------
MESSAGE( STATUS "----------------------------------------------------------------------" )
MESSAGE( STATUS "Welcome! This is OpenWalnut Build System." )
# if this is included for external module building, find OpenWalnut.
IF( NOT ${OW_EXTERNAL_MODULE} )
# to allow non-core code to access core and ext absolutely
MESSAGE( STATUS "This is OpenWalnut Build System." )
INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR} )
ELSE()
MESSAGE( STATUS "This is OpenWalnut Build System configured for external use." )
MESSAGE( STATUS "NOTE: configuring for external use." )
FIND_PATH( OPENWALNUT_INCLUDE_DIR core/kernel/WKernel.h ${OPENWALNUT_INCLUDEDIR} $ENV{OPENWALNUT_INCLUDEDIR} /usr/include/openwalnut /usr/local/include/openwalnut )
FIND_LIBRARY( OPENWALNUT_LIBRARIES NAMES ${OW_LIB_OPENWALNUT} lib${OW_LIB_OPENWALNUT} HINTS
......@@ -110,6 +112,48 @@ ELSE()
ENDIF()
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# The openwalnut executable should print the revision/tag
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# Generate needed headers
# NOTE: add a line ADD_DEPENDENCIES( XYZ OW_generate_version_header ) to your target XYZ if you need the header!
# where to put the header
SET( OW_VERSION_HEADER_DIRECTORY ${PROJECT_BINARY_DIR}/versionHeader )
# Call the file differently depending on internal or external build
IF( NOT ${OW_EXTERNAL_MODULE} )
# if we build OW, we want the version header to be placed in core later on
SET( OW_VERSION_HEADER_FILENAME "core/WVersion.h" )
ELSE()
# if this is for external use, the module might want to use its own version header
# if we build OW, we want the version header to be placed in core later on
SET( OW_VERSION_HEADER_FILENAME "WToolboxVersion.h" )
ENDIF()
# the complete header filename:
SET( OW_VERSION_HEADER ${OW_VERSION_HEADER_DIRECTORY}/${OW_VERSION_HEADER_FILENAME} )
# to allow all those targets to find the header:
INCLUDE_DIRECTORIES( ${OW_VERSION_HEADER_DIRECTORY} )
# Setup the target
SETUP_VERSION_HEADER( ${OW_VERSION_HEADER} )
# Set the OW version string. This can be used by others for setting target versions during compilation.
GET_VERSION_STRING( OW_VERSION OW_LIB_VERSION )
IF( NOT ${OW_EXTERNAL_MODULE} )
MESSAGE( STATUS "OW Version: \"${OW_VERSION}\"; OW Lib Version: \"${OW_LIB_VERSION}\"." )
ELSE()
MESSAGE( STATUS "OW Toolbox Version: \"${OW_VERSION}\"; OW Toolbox Lib Version: \"${OW_LIB_VERSION}\"." )
ENDIF()
# We need a SOVERSION too. This somehow describes the API compatibility. We use the major number here.
SPLIT_VERSION_STRING( ${OW_LIB_VERSION} OW_VERSION_MAJOR OW_VERSION_MINOR OW_VERSION_PATCH )
SET( OW_SOVERSION ${OW_VERSION_MAJOR} )
MESSAGE( STATUS "----------------------------------------------------------------------" )
# ---------------------------------------------------------------------------------------------------------------------------------------------------
#
# This is mandatory. Defines the target paths for building all elements in OpenWalnut
#
......@@ -175,11 +219,12 @@ FUNCTION( BUILD_SYSTEM_COMPILER )
SET( CMAKE_CXX_FLAGS "${OW_CXX_FLAGS_INJECT} ${CMAKE_CXX_FLAGS}" CACHE STRING "" FORCE )
SET( CMAKE_C_FLAGS "${OW_C_FLAGS_INJECT} ${CMAKE_C_FLAGS}" CACHE STRING "" FORCE )
MESSAGE( STATUS "CMAKE_EXE_LINKER_FLAGS = ${CMAKE_EXE_LINKER_FLAGS}" )
MESSAGE( STATUS "CMAKE_MODULE_LINKER_FLAGS = ${CMAKE_MODULE_LINKER_FLAGS}" )
MESSAGE( STATUS "CMAKE_SHARED_LINKER_FLAGS = ${CMAKE_SHARED_LINKER_FLAGS}" )
MESSAGE( STATUS "CMAKE_CXX_FLAGS = ${CMAKE_CXX_FLAGS}" )
MESSAGE( STATUS "CMAKE_C_FLAGS = ${CMAKE_C_FLAGS}" )
# This can be useful for debugging
# MESSAGE( STATUS "CMAKE_EXE_LINKER_FLAGS = ${CMAKE_EXE_LINKER_FLAGS}" )
# MESSAGE( STATUS "CMAKE_MODULE_LINKER_FLAGS = ${CMAKE_MODULE_LINKER_FLAGS}" )
# MESSAGE( STATUS "CMAKE_SHARED_LINKER_FLAGS = ${CMAKE_SHARED_LINKER_FLAGS}" )
# MESSAGE( STATUS "CMAKE_CXX_FLAGS = ${CMAKE_CXX_FLAGS}" )
# MESSAGE( STATUS "CMAKE_C_FLAGS = ${CMAKE_C_FLAGS}" )
ENDFUNCTION( BUILD_SYSTEM_COMPILER )
......@@ -216,27 +261,6 @@ IF( OW_PACKAGE_BUILD )
ENDIF()
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# The openwalnut executable should print the revision/tag
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# Generate needed headers
# NOTE: add a line ADD_DEPENDENCIES( XYZ OW_generate_version_header ) to your target XYZ if you need the header!
SET( OW_VERSION_HEADER_DIRECTORY ${PROJECT_BINARY_DIR}/versionHeader )
SET( OW_VERSION_HEADER ${OW_VERSION_HEADER_DIRECTORY}/WVersion.h )
# to allow all those targets to find the header:
INCLUDE_DIRECTORIES( ${OW_VERSION_HEADER_DIRECTORY} )
# Setup the target
SETUP_VERSION_HEADER( ${OW_VERSION_HEADER} )
# Set the OW version string. This can be used by others for setting target versions during compilation.
GET_VERSION_STRING( OW_VERSION OW_LIB_VERSION )
MESSAGE( STATUS "OW Version: \"${OW_VERSION}\"; OW Lib Version: \"${OW_LIB_VERSION}\"." )
# We need a SOVERSION too. This somehow describes the API compatibility. We use the major number here.
SPLIT_VERSION_STRING( ${OW_LIB_VERSION} OW_VERSION_MAJOR OW_VERSION_MINOR OW_VERSION_PATCH )
SET( OW_SOVERSION ${OW_VERSION_MAJOR} )
# ---------------------------------------------------------------------------------------------------------------------------------------------------
#
# REQUIRED third party libs
#
......
Markdown is supported
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