-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
45 changed files
with
126 additions
and
2,227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,14 @@ IF(NOT WIN32) | |
ENDIF() | ||
ENDIF() | ||
|
||
if(WIN32 AND NOT CYGWIN) | ||
set(DEF_INSTALL_CMAKE_DIR cmake) | ||
else() | ||
set(DEF_INSTALL_CMAKE_DIR lib/cmake/Tinia) | ||
endif() | ||
set(INSTALL_CMAKE_DIR ${DEF_INSTALL_CMAKE_DIR} CACHE PATH | ||
"Installation directory for CMake files") | ||
|
||
IF(NOT WIN32) | ||
OPTION( Tinia_SERVER "Build mod_trell and related components?" ON) | ||
ELSE() | ||
|
@@ -61,7 +69,7 @@ ELSE() | |
ENDIF() | ||
|
||
IF(LIBXML2_FOUND) | ||
|
||
SET(TINIA_LIBRARIES_FOR_CONFIG ${TINIA_LIBRARIES_FOR_CONFIG} ${LIBXML2_LIBRARIES}) | ||
ADD_DEFINITIONS(-DTINIA_HAVE_LIBXML) | ||
ELSE() | ||
SET(LIBXML2_INCLUDE_DIRS "") | ||
|
@@ -75,6 +83,7 @@ set(BOOST_USE_STATIC_LIBS ON) | |
set(Boost_USE_MULTITHREADED ON) | ||
set(Boost_USE_STATIC_RUNTIME OFF) | ||
FIND_PACKAGE( Boost REQUIRED COMPONENTS unit_test_framework prg_exec_monitor thread date_time system ) | ||
SET(TINIA_LIBRARIES_FOR_CONFIG ${TINIA_LIBRARIES_FOR_CONFIG} ${BOOST_LIBRARIES}) | ||
|
||
##### QT ##### | ||
IF(Tinia_DESKTOP) | ||
|
@@ -88,6 +97,7 @@ IF(Tinia_DESKTOP) | |
QT4_WRAP_UI(qtcontroller_FORMS_HEADERS ${qtcontroller_FORMS}) | ||
ADD_DEFINITIONS(${QT_DEFINITIONS}) | ||
ADD_DEFINITIONS(-DQT_SHARED) | ||
SET(TINIA_LIBRARIES_FOR_CONFIG ${TINIA_LIBRARIES_FOR_CONFIG} ${LIBXML2_LIBRARIES} ${QT_LIBRARIES}) | ||
ENDIF() | ||
|
||
|
||
|
@@ -96,6 +106,7 @@ FIND_PACKAGE( OpenGL REQUIRED ) | |
FIND_PACKAGE( GLEW REQUIRED ) | ||
FIND_PACKAGE( GLM REQUIRED ) | ||
|
||
SET(TINIA_LIBRARIES_FOR_CONFIG ${TINIA_LIBRARIES_FOR_CONFIG} ${OPENGL_LIBRARIES} ${GLEW_LIBRARIES}) | ||
IF(Tinia_SERVER) | ||
|
||
FIND_PATH( APACHE_INCLUDE_DIR httpd.h | ||
|
@@ -117,37 +128,48 @@ HINTS "/usr/include/apr-1.0" | |
"/usr/include/apr-1" | ||
"apr-1/" | ||
"apr-1.0") | ||
SET(TINIA_LIBRARIES_FOR_CONFIG ${TINIA_LIBRARIES_FOR_CONFIG} ${RT} ${LIB_APR}) | ||
ENDIF() | ||
|
||
include_directories( "./include" | ||
SET(TINIA_EXTERNAL_INCLUDE_DIRS | ||
${LIBXML2_INCLUDE_DIR} | ||
${GLEW_INCLUDE_DIR} | ||
${GLM_INCLUDE_DIR} | ||
${APACHE_INCLUDE_DIR} | ||
${APR_INCLUDE_DIR} | ||
${QT_INCLUDE_DIR} | ||
${QT_QTOPENGL_INCLUDE_DIR} | ||
${Boost_INCLUDE_DIRS} | ||
${Boost_INCLUDE_DIRS}) | ||
|
||
include_directories( "./include" | ||
${TINIA_EXTERNAL_INCLUDE_DIRS} | ||
) | ||
|
||
link_directories( | ||
${Boost_LIBRARY_DIRS} | ||
) | ||
|
||
ADD_SUBDIRECTORY( "src/model" ) | ||
SET(TINIA_LIBRARIES_FOR_CONFIG ${TINIA_LIBRARIES_FOR_CONFIG} model) | ||
IF(LIBXML2_FOUND) | ||
ADD_SUBDIRECTORY( "src/modelxml" ) | ||
SET(TINIA_LIBRARIES_FOR_CONFIG ${TINIA_LIBRARIES_FOR_CONFIG} modelxml) | ||
ENDIF() | ||
ADD_SUBDIRECTORY( "src/renderlist" ) | ||
SET(TINIA_LIBRARIES_FOR_CONFIG ${TINIA_LIBRARIES_FOR_CONFIG} renderlist) | ||
ADD_SUBDIRECTORY( "src/renderlistgl" ) | ||
SET(TINIA_LIBRARIES_FOR_CONFIG ${TINIA_LIBRARIES_FOR_CONFIG} renderlistgl) | ||
ADD_SUBDIRECTORY( "src/jobcontroller" ) | ||
SET(TINIA_LIBRARIES_FOR_CONFIG ${TINIA_LIBRARIES_FOR_CONFIG} jobcontroller) | ||
IF(Tinia_DESKTOP) | ||
ADD_SUBDIRECTORY( "js") | ||
SET(TINIA_LIBRARIES_FOR_CONFIG ${TINIA_LIBRARIES_FOR_CONFIG} tinia_javascript) | ||
ADD_SUBDIRECTORY( "src/qtcontroller" ) | ||
|
||
ENDIF() | ||
IF(Tinia_SERVER) | ||
ADD_SUBDIRECTORY( "src/trell" ) | ||
SET(TINIA_LIBRARIES_FOR_CONFIG ${TINIA_LIBRARIES_FOR_CONFIG} trell) | ||
ADD_SUBDIRECTORY( "src/mod_trell" ) | ||
ADD_SUBDIRECTORY( "src/trell_master" ) | ||
ENDIF() | ||
|
@@ -203,6 +225,33 @@ SET(CPACK_PACKAGE_VENDOR "SINTEF ICT") | |
|
||
SET(CPACK_PACKAGE_VERSION ${version_number} ) | ||
|
||
# This is for local build directory: | ||
set(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/include" ${TINIA_EXTERNAL_INCLUDE_DIRS}) | ||
configure_file(TiniaConfig.cmake.in | ||
"${PROJECT_BINARY_DIR}/TiniaConfig.cmake" @ONLY) | ||
|
||
# This is for the installed file | ||
# First we need relative path for include | ||
file(RELATIVE_PATH REL_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/${INSTALL_CMAKE_DIR}" | ||
"${CMAKE_INSTALL_PREFIX}/include") | ||
|
||
set(CONF_INCLUDE_DIRS "\${TINIA_CMAKE_DIR}/${REL_INCLUDE_DIR}" ${TINIA_EXTERNAL_INCLUDE_DIRS}) | ||
configure_file(TiniaConfig.cmake.in | ||
"${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/TiniaConfig.cmake" @ONLY) | ||
|
||
configure_file(TiniaConfigVersion.cmake.in | ||
"${PROJECT_BINARY_DIR}/TiniaConfigVersion.cmake" @ONLY) | ||
|
||
# We need to install the config files | ||
install(FILES | ||
"${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/TiniaConfig.cmake" | ||
"${PROJECT_BINARY_DIR}/TiniaConfigVersion.cmake" | ||
DESTINATION "${INSTALL_CMAKE_DIR}" COMPONENT tinia_dev) | ||
|
||
# Install the export set for use with the install-tree | ||
install(EXPORT TiniaTargets DESTINATION | ||
"${INSTALL_CMAKE_DIR}" COMPONENT tinia_dev) | ||
|
||
IF(WIN32) | ||
SET( CPACK_GENERATOR "NSIS" ) | ||
SET( CPACK_NSIS_CONTACT "[email protected]" ) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# - Config file for the Tinia package | ||
# It defines the following variables | ||
# TINIA_INCLUDE_DIRS - include directories for Tinia | ||
# TINIA_LIBRARIES - libraries to link against | ||
|
||
# Compute paths | ||
get_filename_component(TINIA_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) | ||
set(TINIA_INCLUDE_DIRS "@CONF_INCLUDE_DIRS@") | ||
|
||
# Our library dependencies (contains definitions for IMPORTED targets) | ||
#if(NOT TARGET AND NOT FooBar_BINARY_DIR) | ||
include("${TINIA_CMAKE_DIR}/TiniaTargets.cmake") | ||
#endif() | ||
|
||
|
||
set(TINIA_LIBRARIES @TINIA_LIBRARIES_FOR_CONFIG@) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
set(PACKAGE_VERSION "@TINIA_VERSION@") | ||
|
||
# Check whether the requested PACKAGE_FIND_VERSION is compatible | ||
if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}") | ||
set(PACKAGE_VERSION_COMPATIBLE FALSE) | ||
else() | ||
set(PACKAGE_VERSION_COMPATIBLE TRUE) | ||
if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}") | ||
set(PACKAGE_VERSION_EXACT TRUE) | ||
endif() | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.