Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yaml-cpp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
yaml-cpp
Commits
9a72702a
Commit
9a72702a
authored
Mar 16, 2011
by
Jesse Beder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added option to disable compilation of contrib code
parent
ebdfeb03
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
5 deletions
+22
-5
CMakeLists.txt
+22
-5
No files found.
CMakeLists.txt
View file @
9a72702a
...
@@ -33,7 +33,8 @@ enable_testing()
...
@@ -33,7 +33,8 @@ enable_testing()
### Project options
### Project options
###
###
## Project stuff
## Project stuff
option
(
YAML_CPP_BUILD_TOOLS
"Enable testing and parse tools"
ON
)
option
(
YAML_CPP_BUILD_TOOLS
"Enable testing and parse tools"
ON
)
option
(
YAML_CPP_BUILD_CONTRIB
"Enable contrib stuff in library"
ON
)
## Build options
## Build options
# --> General
# --> General
...
@@ -54,14 +55,25 @@ option(MSVC_STHREADED_RT "MSVC: Build with single-threaded static runtime libs (
...
@@ -54,14 +55,25 @@ option(MSVC_STHREADED_RT "MSVC: Build with single-threaded static runtime libs (
###
###
### Sources, headers, directories and libs
### Sources, headers, directories and libs
###
###
file
(
GLOB_RECURSE sources
"src/[a-zA-Z]*.cpp"
)
file
(
GLOB sources
"src/[a-zA-Z]*.cpp"
)
file
(
GLOB_RECURSE public_headers
"include/yaml-cpp/[a-zA-Z]*.h"
)
file
(
GLOB public_headers
"include/yaml-cpp/[a-zA-Z]*.h"
)
file
(
GLOB_RECURSE private_headers
"src/[a-zA-Z]*.h"
)
file
(
GLOB private_headers
"src/[a-zA-Z]*.h"
)
if
(
YAML_CPP_BUILD_CONTRIB
)
file
(
GLOB contrib_sources
"src/contrib/[a-zA-Z]*.cpp"
)
file
(
GLOB contrib_public_headers
"include/yaml-cpp/contrib/[a-zA-Z]*.h"
)
file
(
GLOB contrib_private_headers
"src/contrib/[a-zA-Z]*.h"
)
else
()
add_definitions
(
-DYAML_CPP_NO_CONTRIB
)
endif
()
if
(
VERBOSE
)
if
(
VERBOSE
)
message
(
STATUS
"sources:
${
sources
}
"
)
message
(
STATUS
"sources:
${
sources
}
"
)
message
(
STATUS
"public_headers:
${
public_headers
}
"
)
message
(
STATUS
"public_headers:
${
public_headers
}
"
)
message
(
STATUS
"private_headers:
${
private_headers
}
"
)
message
(
STATUS
"private_headers:
${
private_headers
}
"
)
message
(
STATUS
"contrib_sources:
${
contrib_sources
}
"
)
message
(
STATUS
"contrib_public_headers:
${
contrib_public_headers
}
"
)
message
(
STATUS
"contrib_private_headers:
${
contrib_private_headers
}
"
)
endif
()
endif
()
include_directories
(
${
YAML_CPP_SOURCE_DIR
}
/include
)
include_directories
(
${
YAML_CPP_SOURCE_DIR
}
/include
)
...
@@ -214,6 +226,9 @@ add_library(yaml-cpp
...
@@ -214,6 +226,9 @@ add_library(yaml-cpp
${
sources
}
${
sources
}
${
public_headers
}
${
public_headers
}
${
private_headers
}
${
private_headers
}
${
contrib_sources
}
${
contrib_public_headers
}
${
contrib_private_headers
}
)
)
set_target_properties
(
yaml-cpp PROPERTIES
set_target_properties
(
yaml-cpp PROPERTIES
...
@@ -242,7 +257,9 @@ endif()
...
@@ -242,7 +257,9 @@ endif()
install
(
TARGETS yaml-cpp
${
_INSTALL_DESTINATIONS
}
)
install
(
TARGETS yaml-cpp
${
_INSTALL_DESTINATIONS
}
)
install
(
install
(
FILES
${
public_headers
}
FILES
${
public_headers
}
${
contrib_public_headers
}
DESTINATION
${
INCLUDE_INSTALL_DIR
}
DESTINATION
${
INCLUDE_INSTALL_DIR
}
)
)
...
...
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