Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
ftl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nicolas Pope
ftl
Commits
3193825b
Commit
3193825b
authored
6 years ago
by
Nicolas Pope
Browse files
Options
Downloads
Patches
Plain Diff
Updates for compiling on Windows
parent
2a5c6b25
No related branches found
No related tags found
No related merge requests found
Pipeline
#9528
passed
6 years ago
Stage: test
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
CMakeLists.txt
+12
-7
12 additions, 7 deletions
CMakeLists.txt
cmake/FindURIParser.cmake
+36
-0
36 additions, 0 deletions
cmake/FindURIParser.cmake
cmake/Findglog.cmake
+2
-2
2 additions, 2 deletions
cmake/Findglog.cmake
net/cpp/CMakeLists.txt
+4
-4
4 additions, 4 deletions
net/cpp/CMakeLists.txt
with
54 additions
and
13 deletions
CMakeLists.txt
+
12
−
7
View file @
3193825b
...
@@ -12,6 +12,13 @@ enable_testing()
...
@@ -12,6 +12,13 @@ enable_testing()
set
(
THREADS_PREFER_PTHREAD_FLAG ON
)
set
(
THREADS_PREFER_PTHREAD_FLAG ON
)
set
(
CMAKE_MODULE_PATH
${
CMAKE_MODULE_PATH
}
"
${
CMAKE_SOURCE_DIR
}
/cmake/"
)
set
(
CMAKE_MODULE_PATH
${
CMAKE_MODULE_PATH
}
"
${
CMAKE_SOURCE_DIR
}
/cmake/"
)
find_package
(
glog REQUIRED
)
find_package
(
OpenCV REQUIRED
)
find_package
(
Threads REQUIRED
)
find_package
(
URIParser REQUIRED
)
find_package
(
MsgPack
)
find_package
(
LibSGM
)
check_language
(
CUDA
)
check_language
(
CUDA
)
if
(
CUDA_TOOLKIT_ROOT_DIR
)
if
(
CUDA_TOOLKIT_ROOT_DIR
)
enable_language
(
CUDA
)
enable_language
(
CUDA
)
...
@@ -22,23 +29,21 @@ add_definitions(-DHAVE_CUDA)
...
@@ -22,23 +29,21 @@ add_definitions(-DHAVE_CUDA)
include_directories
(
${
CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES
}
)
include_directories
(
${
CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES
}
)
endif
()
endif
()
find_package
(
glog REQUIRED
)
if
(
NOT MsgPack_FOUND
)
find_package
(
OpenCV REQUIRED
)
find_package
(
Threads REQUIRED
)
find_package
(
MsgPack
)
find_package
(
LibSGM
)
if
(
NOT MSGPACK_FOUND
)
check_include_file_cxx
(
"msgpack.hpp"
MSGPACK_FOUND
)
check_include_file_cxx
(
"msgpack.hpp"
MSGPACK_FOUND
)
if
(
NOT MSGPACK_FOUND
)
if
(
NOT MSGPACK_FOUND
)
message
(
ERROR
"Msgpack is required"
)
message
(
ERROR
"Msgpack is required"
)
endif
()
endif
()
else
()
include_directories
(
${
MSGPACK_INCLUDE_DIRS
}
)
endif
()
endif
()
if
(
NOT WIN32
)
check_include_file
(
"uuid/uuid.h"
UUID_FOUND
)
check_include_file
(
"uuid/uuid.h"
UUID_FOUND
)
if
(
NOT UUID_FOUND
)
if
(
NOT UUID_FOUND
)
message
(
ERROR
"UUID library is required"
)
message
(
ERROR
"UUID library is required"
)
endif
()
endif
()
endif
()
find_program
(
CPPCHECK_FOUND cppcheck
)
find_program
(
CPPCHECK_FOUND cppcheck
)
if
(
CPPCHECK_FOUND
)
if
(
CPPCHECK_FOUND
)
...
...
This diff is collapsed.
Click to expand it.
cmake/FindURIParser.cmake
0 → 100644
+
36
−
0
View file @
3193825b
###############################################################################
# Find URI Parser
#
if
(
WIN32
)
find_path
(
URIP_DIR NAMES include/uriparser/Uri.h PATHS
"C:/Program Files/uriparser"
"C:/Program Files (x86)/uriparser"
)
else
()
set
(
URIP_DIR
""
)
endif
()
# Find lib
set
(
URIPARSER_FOUND FALSE CACHE BOOL
""
FORCE
)
find_library
(
URIPARSER_LIBRARY
NAMES uriparser liburiparser
PATHS
${
URIP_DIR
}
PATH_SUFFIXES lib/
)
# Find include
find_path
(
URIPARSER_INCLUDE_DIRS
NAMES uriparser/Uri.h
PATHS
${
URIP_DIR
}
PATH_SUFFIXES include
)
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
URIParser DEFAULT_MSG URIPARSER_LIBRARY URIPARSER_INCLUDE_DIRS
)
mark_as_advanced
(
URIPARSER_FOUND
)
if
(
URIPARSER_FOUND
)
include_directories
(
${
URIPARSER_INCLUDE_DIRS
}
)
set
(
URIPARSER_FOUND TRUE CACHE BOOL
""
FORCE
)
set
(
URIPARSER_LIBRARIES
${
URIPARSER_LIBRARY
}
)
message
(
STATUS
"Found URIParser"
)
endif
()
This diff is collapsed.
Click to expand it.
cmake/Findglog.cmake
+
2
−
2
View file @
3193825b
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
#
#
if
(
WIN32
)
if
(
WIN32
)
find_path
(
glog_DIR
glog PATHS
"C:/Program Files
"
"C:/Program Files (x86)"
)
find_path
(
glog_DIR
NAMES include/glog/logging.h PATHS
"C:/Program Files/glog"
"C:/Program Files/google-glog
"
"C:/Program Files (x86)
/google-glog
"
)
set
(
glog_DIR
${
glog_DIR
}
/glog
)
set
(
glog_DIR
${
glog_DIR
}
)
else
()
else
()
set
(
glog_DIR
""
)
set
(
glog_DIR
""
)
endif
()
endif
()
...
...
This diff is collapsed.
Click to expand it.
net/cpp/CMakeLists.txt
+
4
−
4
View file @
3193825b
...
@@ -11,10 +11,10 @@ set(NETSOURCE
...
@@ -11,10 +11,10 @@ set(NETSOURCE
src/protocol.cpp
src/protocol.cpp
)
)
check_include_file
(
"uriparser/Uri.h"
HAVE_URI_H
)
#
check_include_file("uriparser/Uri.h" HAVE_URI_H)
if
(
NOT HAVE_URI_H
)
#
if(NOT HAVE_URI_H)
message
(
FATAL_ERROR
"Uriparser not found"
)
#
message(FATAL_ERROR "Uriparser not found")
endif
()
#
endif()
check_function_exists
(
uriParseSingleUriA HAVE_URIPARSESINGLE
)
check_function_exists
(
uriParseSingleUriA HAVE_URIPARSESINGLE
)
add_library
(
net
${
NETSOURCE
}
)
add_library
(
net
${
NETSOURCE
}
)
...
...
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