~ubuntu-branches/ubuntu/vivid/openwalnut/vivid

« back to all changes in this revision

Viewing changes to src/core/CMakeLists.txt

  • Committer: Package Import Robot
  • Author(s): Sebastian Eichelbaum
  • Date: 2014-03-19 17:46:12 UTC
  • mfrom: (3.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20140319174612-e4mgtr1avbq3f7ph
Tags: 1.4.0~rc1+hg3a3147463ee2-1
* Major functionality and stability improvements.
* Several bug fixes
* Changed ttf-liberation dependency to fonts-liberation (Closes: #722405)
* OpenWalnut now works properly with OpenSceneGraph 3.2 (Closes: #718381)
* See http://www.openwalnut.org/versions/2

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
ADD_DEFINITIONS( '-DW_LIB_PREFIX="${CMAKE_SHARED_LIBRARY_PREFIX}"' )
36
36
ADD_DEFINITIONS( '-DW_LIB_SUFFIX="${CMAKE_SHARED_LIBRARY_SUFFIX}"' )
37
37
 
 
38
OPTION( OW_STATIC_BUILD "Enable this to build the core library as static library." OFF )
 
39
 
 
40
# the files to link against if we found the necessary libs for a script interpreter
 
41
SET( INTERPRETER_LINK_LIBRARIES )
 
42
 
 
43
IF( BUILD_PYTHON_INTERPRETER )
 
44
    # Python
 
45
    FIND_PACKAGE( PythonLibs REQUIRED )
 
46
    
 
47
    # Python found?
 
48
    IF( PYTHONLIBS_FOUND AND Boost_FOUND )
 
49
        INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIR} ${PYTHON_INCLUDE_DIRS} )
 
50
        ADD_DEFINITIONS( -DPYTHON_FOUND )
 
51
        SET( INTERPRETER_LINK_LIBRARIES ${INTERPRETER_LINK_LIBRARIES} ${PYTHON_LIBRARIES} )
 
52
    ENDIF()
 
53
ENDIF() # BUILD_SCRIPTENGINE
 
54
 
38
55
# ---------------------------------------------------------------------------------------------------------------------------------------------------
39
56
# Add sources as target
40
57
# ---------------------------------------------------------------------------------------------------------------------------------------------------
43
60
COLLECT_COMPILE_FILES( "${CMAKE_CURRENT_SOURCE_DIR}" TARGET_CPP_FILES TARGET_H_FILES TARGET_TEST_FILES )
44
61
 
45
62
# Setup the target
46
 
ADD_LIBRARY( ${LibName} SHARED ${TARGET_CPP_FILES} ${TARGET_H_FILES} ${OW_VERSION_HEADER} )
47
 
TARGET_LINK_LIBRARIES( ${LibName} ${Boost_LIBRARIES} ${CMAKE_STANDARD_LIBRARIES} ${CMAKE_DL_LIBS} ${OPENGL_gl_LIBRARY} ${OPENSCENEGRAPH_LIBRARIES}
 
63
IF( OW_STATIC_BUILD )
 
64
    ADD_LIBRARY( ${LibName} STATIC ${TARGET_CPP_FILES} ${TARGET_H_FILES} ${OW_VERSION_HEADER} )
 
65
ELSE()
 
66
    ADD_LIBRARY( ${LibName} SHARED ${TARGET_CPP_FILES} ${TARGET_H_FILES} ${OW_VERSION_HEADER} )
 
67
ENDIF()
 
68
 
 
69
TARGET_LINK_LIBRARIES( ${LibName} ${Boost_LIBRARIES} ${CMAKE_STANDARD_LIBRARIES} ${CMAKE_DL_LIBS} ${OPENGL_gl_LIBRARY} ${OPENSCENEGRAPH_LIBRARIES} ${INTERPRETER_LINK_LIBRARIES}
48
70
                     )
49
71
 
50
72
# Tell CMake that someone creates this file for us. See doc of SETUP_VERSION_HEADER for details why this is needed.
149
171
SETUP_STYLECHECKER( "${LibName}"
150
172
                    "${TARGET_CPP_FILES};${TARGET_H_FILES};${TARGET_TEST_FILES};${TARGET_GLSL_FILES}"  # add all these files to the stylechecker
151
173
                    "" )                                        # exlude some ugly files
152