Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
vite
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
solverstack
vite
Commits
653b0a71
Commit
653b0a71
authored
11 years ago
by
Johnny Jazeix
Browse files
Options
Downloads
Patches
Plain Diff
use otfconfig to find otf directories
parent
ab8fc768
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+1
-1
1 addition, 1 deletion
CMakeLists.txt
cmake/FindOTF.cmake
+34
-17
34 additions, 17 deletions
cmake/FindOTF.cmake
src/CMakeLists.txt
+7
-1
7 additions, 1 deletion
src/CMakeLists.txt
with
42 additions
and
19 deletions
CMakeLists.txt
+
1
−
1
View file @
653b0a71
...
...
@@ -96,7 +96,7 @@ check_include_files(string.h HAVE_STRING_H)
# Components : filesystem, iostreams, programoptions, python, regex,
# serialization, signals, system, thread, wave
if
(
VITE_ENABLE_SERIALIZATION
)
find_package
(
Boost COMPONENTS serialization thread iostreams
)
find_package
(
Boost COMPONENTS serialization thread iostreams
system
)
endif
(
VITE_ENABLE_SERIALIZATION
)
if
(
VITE_ENABLE_VBO
)
...
...
This diff is collapsed.
Click to expand it.
cmake/FindOTF.cmake
+
34
−
17
View file @
653b0a71
...
...
@@ -3,7 +3,8 @@
#
# OTF_INCLUDE_DIR - Directories to include to use OTF
# OTF_LIBRARY - Files to link against to use OTF
# OTF_LIBRARY - Files to link against to use OTF
# OTF_LIBRARY_DIR - Directories to link to use OTF
# OTF_FOUND - When false, don't try to use OTF
#
# OTF_DIR can be used to make it simpler to find the various include
...
...
@@ -12,32 +13,48 @@
# compilation or because you installed it in an "unusual" directory).
# Just set OTF_DIR it to your specific installation directory
#
FIND_LIBRARY
(
OTF_LIBRARY otf
FIND_PROGRAM
(
OTF_CONFIG_EXE otfconfig
PATHS
/usr/
lib
/usr/local/
lib
${
OTF_DIR
}
/
lib
/usr/
bin
/usr/local/
bin
${
OTF_DIR
}
/
bin
)
IF
(
OTF_LIBRARY
)
GET_FILENAME_COMPONENT
(
OTF_GUESSED_INCLUDE_DIR_tmp
"
${
OTF_LIBRARY
}
"
PATH
)
STRING
(
REGEX REPLACE
"lib$"
"include"
OTF_GUESSED_INCLUDE_DIR
"
${
OTF_GUESSED_INCLUDE_DIR_tmp
}
"
)
ENDIF
(
OTF_LIBRARY
)
# Use otfconfig to find paths
IF
(
OTF_CONFIG_EXE
)
EXECUTE_PROCESS
(
COMMAND
"
${
OTF_CONFIG_EXE
}
"
"--includes"
OUTPUT_VARIABLE OTF_INCLUDE_DIR
)
EXECUTE_PROCESS
(
COMMAND
"
${
OTF_CONFIG_EXE
}
"
"--libs"
OUTPUT_VARIABLE OTF_LIBS
)
ENDIF
(
OTF_CONFIG_EXE
)
FIND_PATH
(
OTF_INCLUDE_DIR otf.h OTF_KeyValue.h
PATHS
${
OTF_GUESSED_INCLUDE_DIR
}
${
OTF_DIR
}
/include
/usr/include
/usr/local/include
${
CMAKE_SOURCE_DIR
}
/externals/otf/otflib/
)
IF
(
OTF_LIBS
)
# OTF_LIBS is "-Lpath -lotf {-lz}"
STRING
(
REGEX MATCHALL
"([^
\
]+
\
|[^
\
]+$)"
ARG_LIST
"
${
OTF_LIBS
}
"
)
# MESSAGE( "list = ${ARG_LIST}" )
FOREACH
(
listVar
${
ARG_LIST
}
)
IF
(
listVar MATCHES
"-L.*"
)
# Gets the lib path
STRING
(
REGEX REPLACE
"-L"
""
listVar
"
${
listVar
}
"
)
STRING
(
REGEX REPLACE
" "
""
listVar
"
${
listVar
}
"
)
# MESSAGE( "libpath = ${listVar}" )
LIST
(
APPEND OTF_LIBRARY_DIR
${
listVar
}
)
ENDIF
()
IF
(
listVar MATCHES
"-lo.*"
)
# only gets the otf lib. If only -l.*, we also gets -lz and it does not work
STRING
(
REGEX REPLACE
"-l"
""
listVar
"
${
listVar
}
"
)
STRING
(
REGEX REPLACE
" "
""
listVar
"
${
listVar
}
"
)
# MESSAGE( "libs = ${listVar}" )
LIST
(
APPEND OTF_LIBRARY
${
listVar
}
)
ENDIF
()
ENDFOREACH
(
listVar
)
ENDIF
(
OTF_LIBS
)
IF
(
OTF_INCLUDE_DIR
)
# Remove the -I because cmake handles it
STRING
(
REGEX REPLACE
"-I"
""
OTF_INCLUDE_DIR
"
${
OTF_INCLUDE_DIR
}
"
)
IF
(
OTF_LIBRARY
)
SET
(
OTF_FOUND
"YES"
)
MARK_AS_ADVANCED
(
OTF_DIR
)
MARK_AS_ADVANCED
(
OTF_INCLUDE_DIR
)
MARK_AS_ADVANCED
(
OTF_LIBRARY_DIR
)
MARK_AS_ADVANCED
(
OTF_LIBRARY
)
ENDIF
(
OTF_LIBRARY
)
ENDIF
(
OTF_INCLUDE_DIR
)
...
...
This diff is collapsed.
Click to expand it.
src/CMakeLists.txt
+
7
−
1
View file @
653b0a71
...
...
@@ -293,7 +293,8 @@ IF(VITE_ENABLE_OTF)
parser/OTFParser/OTFTraceBuilderThread.cpp
)
ENDIF
()
INCLUDE_DIRECTORIES
(
${
OTF_INCLUDE_DIR
}
)
INCLUDE_DIRECTORIES
(
BEFORE
${
OTF_INCLUDE_DIR
}
)
ENDIF
(
VITE_ENABLE_OTF
)
...
...
@@ -401,6 +402,11 @@ INCLUDE_DIRECTORIES(
)
#ADD_LIBRARY(vite2 SHARED ${VITE_SRCS} ${VITE_MOC} ${VITE_RCC_SRCS})
IF
(
VITE_ENABLE_OTF
)
LINK_DIRECTORIES
(
${
OTF_LIBRARY_DIR
}
)
ENDIF
(
VITE_ENABLE_OTF
)
if
(
APPLE
)
INCLUDE_DIRECTORIES
(
/usr/X11/include
)
SET
(
OSX_ICON_FILES
"interface/icon/mac_logo.icns"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment