Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
vite
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
4
Issues
4
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
solverstack
vite
Commits
7e39efea
Commit
7e39efea
authored
Jul 26, 2011
by
Mathieu Faverge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean CMakeList
parent
1da1c795
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
77 additions
and
32 deletions
+77
-32
CMakeLists.txt
CMakeLists.txt
+77
-32
No files found.
CMakeLists.txt
View file @
7e39efea
PROJECT
(
VITE CXX C
)
cmake_minimum_required
(
VERSION 2.8
)
project
(
VITE CXX C
)
CMAKE_MINIMUM_REQUIRED
(
VERSION 2.4
)
### The current version number
set
(
VITE_VERSION_MAJOR 1
)
set
(
VITE_VERSION_MINOR 2
)
set
(
VITE_VERSION_PATCH 0
)
IF
(
COMMAND CMAKE_POLICY
)
if
(
COMMAND CMAKE_POLICY
)
# CMP0003: add the link paths to the link command as with cmake 2.4
# CMP0003: add the link paths to the link command as with cmake 2.4
CMAKE_POLICY
(
SET CMP0003 NEW
)
cmake_policy
(
SET CMP0003 NEW
)
ENDIF
(
COMMAND CMAKE_POLICY
)
endif
(
COMMAND CMAKE_POLICY
)
FIND_PACKAGE
(
Qt4
### Misc options
COMPONENTS QtCore QtGui QtXml REQUIRED
)
option
(
BUILD_SHARED_LIBS
SET
(
QT_USE_QTUITOOLS ON
)
"Build shared libraries"
OFF
)
SET
(
QT_USE_QTOPENGL ON
)
option
(
BUILD_64bits
INCLUDE
(
${
QT_USE_FILE
}
)
"Build 64 bits mode"
ON
)
if
(
NOT CMAKE_BUILD_TYPE
)
set
(
CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
"Choose the type of build, options are None, Debug, Release, RelWithDebInfo and MinSizeRel."
FORCE
)
endif
(
NOT CMAKE_BUILD_TYPE
)
FIND_PACKAGE
(
GLU
)
# cmake modules setup
set
(
CMAKE_MODULE_PATH
"
${
CMAKE_SOURCE_DIR
}
/cmake/"
)
include
(
CMakeDetermineSystem
)
include
(
CheckCCompilerFlag
)
include
(
CheckFunctionExists
)
include
(
CheckSymbolExists
)
include
(
CheckIncludeFiles
)
### Required Packages
find_package
(
Qt4 COMPONENTS QtCore QtGui QtXml REQUIRED
)
set
(
QT_USE_QTUITOOLS ON
)
set
(
QT_USE_QTOPENGL ON
)
include
(
${
QT_USE_FILE
}
)
# search for Boost
find_package
(
OpenGL
)
# Components :
#filesystem, iostreams, programoptions, python, regex, serialization, signals
#system, thread, wave
OPTION
(
VITE_ENABLE_SERIALIZATION
"Enable the support of Boost Serialization."
OFF
)
IF
(
VITE_ENABLE_SERIALIZATION
)
FIND_PACKAGE
(
Boost COMPONENTS serialization thread iostreams
)
ENDIF
(
VITE_ENABLE_SERIALIZATION
)
### Optimization options
option
(
VITE_ENABLE_SERIALIZATION
"Enable the support of Boost Serialization."
OFF
)
option
(
VITE_ENABLE_VBO
"Enable the support of VBO."
OFF
)
OPTION
(
VITE_ENABLE_VBO
"Enable the support of VBO."
OFF
)
### Trace format options
IF
(
VITE_ENABLE_VBO
)
option
(
VITE_ENABLE_OTF
INCLUDE
(
cmake/FindGLEW.cmake
)
"Enable the support of OTF file format."
ON
)
ENDIF
(
VITE_ENABLE_VBO
)
option
(
VITE_ENABLE_TAU
"Enable the support of TAU file format."
ON
)
OPTION
(
VITE_ENABLE_OTF
"Enable the support of OTF file format."
ON
)
# stdlib, stdio, string, getopt, etc
IF
(
VITE_ENABLE_OTF
)
check_include_files
(
stdarg.h HAVE_STDARG_H
)
INCLUDE
(
cmake/FindOTF.cmake
)
check_function_exists
(
va_copy HAVE_VA_COPY
)
ENDIF
(
VITE_ENABLE_OTF
)
if
(
NOT HAVE_VA_COPY
)
check_function_exists
(
__va_copy HAVE_UNDERSCORE_VA_COPY
)
endif
(
NOT HAVE_VA_COPY
)
check_function_exists
(
asprintf HAVE_ASPRINTF
)
check_function_exists
(
vasprintf HAVE_VASPRINTF
)
check_include_files
(
getopt.h HAVE_GETOPT_H
)
check_include_files
(
unistd.h HAVE_UNISTD_H
)
check_function_exists
(
getopt_long HAVE_GETOPT_LONG
)
check_include_files
(
errno.h HAVE_ERRNO_H
)
check_include_files
(
stddef.h HAVE_STDDEF_H
)
check_function_exists
(
getrusage HAVE_GETRUSAGE
)
check_include_files
(
limits.h HAVE_LIMITS_H
)
check_include_files
(
string.h HAVE_STRING_H
)
OPTION
(
VITE_ENABLE_TAU
"Enable the support of TAU file format."
ON
)
#
IF
(
VITE_ENABLE_TAU
)
# Find optional packages
INCLUDE
(
cmake/FindTAU.cmake
)
#
ENDIF
(
VITE_ENABLE_TAU
)
set
(
CMAKE_BUILD_TYPE Release
)
# Search for Boost
# Components : filesystem, iostreams, programoptions, python, regex,
# serialization, signals, system, thread, wave
if
(
VITE_ENABLE_SERIALIZATION
)
find_package
(
Boost COMPONENTS serialization thread iostreams
)
endif
(
VITE_ENABLE_SERIALIZATION
)
if
(
VITE_ENABLE_VBO
)
find_package
(
GLEW
)
endif
(
VITE_ENABLE_VBO
)
if
(
VITE_ENABLE_OTF
)
find_package
(
OTF
)
endif
(
VITE_ENABLE_OTF
)
if
(
VITE_ENABLE_TAU
)
find_package
(
TAU
)
endif
(
VITE_ENABLE_TAU
)
SUBDIRS
(
src
)
SUBDIRS
(
src
)
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