Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
d3d58c3a
Commit
d3d58c3a
authored
Mar 23, 2012
by
Sebastian Eichelbaum
Browse files
[CHANGE
#144
] now the ow script supports external development properly
parent
1f2387fb
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
51 additions
and
15 deletions
+51
-15
doc/developer/doxygenConfig
doc/developer/doxygenConfig
+1
-1
src/CMakeLists.txt
src/CMakeLists.txt
+3
-5
src/core/CMakeLists.txt
src/core/CMakeLists.txt
+1
-1
src/modules/detTractClustering/CMakeLists.txt
src/modules/detTractClustering/CMakeLists.txt
+2
-2
src/qt4gui/CMakeLists.txt
src/qt4gui/CMakeLists.txt
+1
-1
tools/cmake/OpenWalnut.cmake
tools/cmake/OpenWalnut.cmake
+42
-4
tools/cmake/OpenWalnutUtils.cmake
tools/cmake/OpenWalnutUtils.cmake
+1
-1
No files found.
doc/developer/doxygenConfig
View file @
d3d58c3a
...
...
@@ -31,7 +31,7 @@ PROJECT_NAME = OpenWalnut
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = 1.
2.5
PROJECT_NUMBER = 1.
3.0
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
...
...
src/CMakeLists.txt
View file @
d3d58c3a
...
...
@@ -43,6 +43,9 @@ SET( OW_TOOLS_DIR ${PROJECT_SOURCE_DIR}/../tools )
# append search path for FindModules:
LIST
(
APPEND CMAKE_MODULE_PATH
${
OW_TOOLS_DIR
}
/cmake
)
# use internally
SET
(
OW_EXTERNAL_MODULE false
)
# These scripts contains all the needed tools to setup the build:
# * Compiler Setup
# * Common OpenWalnut Options
...
...
@@ -127,14 +130,9 @@ ADD_DEPENDENCIES( install_devdoc core_devdoc )
#
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# to allow non-core code to access core and ext absolutely
INCLUDE_DIRECTORIES
(
${
PROJECT_SOURCE_DIR
}
)
# -----------------------------------------------------------------------------------------------------------------------------------------------
# core library
SET
(
OWCoreName
"openwalnut"
)
# build core
ADD_SUBDIRECTORY
(
core
)
...
...
src/core/CMakeLists.txt
View file @
d3d58c3a
...
...
@@ -26,7 +26,7 @@
# Some common setup
# ---------------------------------------------------------------------------------------------------------------------------------------------------
SET
(
LibName
${
OW
CoreName
}
)
SET
(
LibName
${
OW
_LIB_OPENWALNUT
}
)
# Set the prefix and suffix of dynamically loadable modules to match
# CMAKEs naming of them. The quotes are necessary so the shell doesn't mess
...
...
src/modules/detTractClustering/CMakeLists.txt
View file @
d3d58c3a
...
...
@@ -47,7 +47,7 @@ COLLECT_COMPILE_FILES( "${MODULE_SOURCE_DIR}" TARGET_CPP_FILES TARGET_H_FILES TA
IF
(
CUDA_FOUND AND OW_USE_CUDA
)
FILE
(
GLOB_RECURSE CUDA_SRC
"*.cu"
)
CUDA_ADD_LIBRARY
(
${
MODULE_NAME
}
SHARED
${
TARGET_CPP_FILES
}
${
TARGET_H_FILES
}
${
CUDA_SRC
}
)
TARGET_LINK_LIBRARIES
(
${
MODULE_NAME
}
${
OW
CoreName
}
${
CUDA_LIBRARIES
}
)
TARGET_LINK_LIBRARIES
(
${
MODULE_NAME
}
${
OW
_LIB_OPENWALNUT
}
${
CUDA_LIBRARIES
}
)
ELSE
()
# Remove files that do including cuda stuff
LIST
(
REMOVE_ITEM TARGET_H_FILES
${
CMAKE_CURRENT_SOURCE_DIR
}
/WCheckCudaError.h
)
...
...
@@ -58,7 +58,7 @@ ELSE()
# Build the module without the cuda codes
ADD_LIBRARY
(
${
MODULE_NAME
}
SHARED
${
TARGET_CPP_FILES
}
${
TARGET_H_FILES
}
)
TARGET_LINK_LIBRARIES
(
${
MODULE_NAME
}
${
OW
CoreName
}
)
TARGET_LINK_LIBRARIES
(
${
MODULE_NAME
}
${
OW
_LIB_OPENWALNUT
}
)
ENDIF
()
# Set the version of the library.
...
...
src/qt4gui/CMakeLists.txt
View file @
d3d58c3a
...
...
@@ -70,7 +70,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} )
# Setup the target
ADD_EXECUTABLE
(
${
BinName
}
${
TARGET_CPP_FILES
}
${
TARGET_H_FILES
}
${
OW_VERSION_HEADER
}
)
TARGET_LINK_LIBRARIES
(
${
BinName
}
${
OW
CoreName
}
${
QT_LIBS
}
${
Boost_LIBRARIES
}
)
TARGET_LINK_LIBRARIES
(
${
BinName
}
${
OW
_LIB_OPENWALNUT
}
${
QT_LIBS
}
${
Boost_LIBRARIES
}
)
# Tell CMake that someone creates this file for us. See doc of SETUP_VERSION_HEADER for details why this is needed.
# NOTE: this needs to be placed AFTER ADD_EXECUTABLE or ADD_LIBRARY
...
...
tools/cmake/OpenWalnut.cmake
View file @
d3d58c3a
...
...
@@ -24,6 +24,48 @@
INCLUDE
(
OpenWalnutUtils
)
# name of the core lib. Used when linking modules or other GUI
SET
(
OW_LIB_OPENWALNUT
"openwalnut"
)
# ---------------------------------------------------------------------------------------------------------------------------------------------------
#
# External Building Support
#
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# 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."
)
FIND_PATH
(
OPENWALNUT_INCLUDE_DIR core/kernel/WKernel.h $ENV{OPENWALNUT_INCLUDEDIR} /usr/include/openwalnut /usr/local/include/openwalnut
)
FIND_LIBRARY
(
OPENWALNUT_LIBRARIES NAMES
${
OW_LIB_OPENWALNUT
}
lib
${
OW_LIB_OPENWALNUT
}
HINTS $ENV{OPENWALNUT_LIBDIR} /usr/lib /usr/local/lib
)
SET
(
OPENWALNUT_FOUND FALSE
)
# provide some output
IF
(
OPENWALNUT_INCLUDE_DIR
)
MESSAGE
(
STATUS
"Found OpenWalnut include files in
${
OPENWALNUT_INCLUDE_DIR
}
."
)
ENDIF
()
IF
(
OPENWALNUT_LIBRARIES
)
MESSAGE
(
STATUS
"Found OpenWalnut libs in
${
OPENWALNUT_LIBRARIES
}
."
)
ENDIF
()
# really found?
IF
(
OPENWALNUT_INCLUDE_DIR AND OPENWALNUT_LIBRARIES
)
SET
(
OPENWALNUT_FOUND TRUE
)
MESSAGE
(
STATUS
"Found OpenWalnut."
)
ELSE
()
MESSAGE
(
FATAL_ERROR
"Could not find OpenWalnut."
)
ENDIF
()
# include
INCLUDE_DIRECTORIES
(
${
OPENWALNUT_INCLUDE_DIR
}
)
SET
(
OW_LIB_OPENWALNUT
${
OPENWALNUT_LIBRARIES
}
)
ENDIF
()
# ---------------------------------------------------------------------------------------------------------------------------------------------------
#
# This is mandatory. Defines the target paths for building all elements in OpenWalnut
...
...
@@ -82,10 +124,6 @@ FUNCTION( BUILD_SYSTEM_COMPILER )
SET
(
CMAKE_CXX_FLAGS_RELWITHDEBINFO
"-g -DDEBUG -O2"
CACHE STRING
""
FORCE
)
ENDFUNCTION
(
BUILD_SYSTEM_COMPILER
)
# This finds all the needed third-party libs for you and sets them up properly. Usually, you will not need to call this explicitly.
FUNCTION
(
BUILD_SYSTEM_DEPENDENCIES
)
ENDFUNCTION
(
BUILD_SYSTEM_DEPENDENCIES
)
# ---------------------------------------------------------------------------------------------------------------------------------------------------
#
# This is executed on inclusion. It sets up everything needed. Beginning with compiler and OpenWalnut options and the third-party dependencies.
...
...
tools/cmake/OpenWalnutUtils.cmake
View file @
d3d58c3a
...
...
@@ -654,7 +654,7 @@ FUNCTION( SETUP_MODULE _MODULE_NAME _MODULE_SOURCE_DIR _MODULE_DEPENDENCIES _MOD
# Setup the target
ADD_LIBRARY
(
${
MODULE_NAME
}
SHARED
${
TARGET_CPP_FILES
}
${
TARGET_H_FILES
}
)
TARGET_LINK_LIBRARIES
(
${
MODULE_NAME
}
${
OW
CoreName
}
${
Boost_LIBRARIES
}
${
OPENGL_gl_LIBRARY
}
${
OPENSCENEGRAPH_LIBRARIES
}
${
_MODULE_DEPENDENCIES
}
)
TARGET_LINK_LIBRARIES
(
${
MODULE_NAME
}
${
OW
_LIB_OPENWALNUT
}
${
Boost_LIBRARIES
}
${
OPENGL_gl_LIBRARY
}
${
OPENSCENEGRAPH_LIBRARIES
}
${
_MODULE_DEPENDENCIES
}
)
# Set the version of the library.
SET_TARGET_PROPERTIES
(
${
MODULE_NAME
}
PROPERTIES
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment