Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libconfig
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
libconfig
Commits
020a9ce1
Unverified
Commit
020a9ce1
authored
Nov 09, 2021
by
Mark Lindner
Committed by
GitHub
Nov 09, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #213 from thomastrapp/master
Fix locale handling when building with cmake
parents
98a52a4d
b3a1aedf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
10 deletions
+22
-10
lib/CMakeLists.txt
lib/CMakeLists.txt
+22
-10
No files found.
lib/CMakeLists.txt
View file @
020a9ce1
...
...
@@ -58,10 +58,6 @@ set_target_properties(${libname}++
VERSION
"
${
libconfig_VERSION
}
"
PUBLIC_HEADER
"
${
libinc_cpp
}
"
)
#check_symbol_exists(uselocale "locale.h" HAVE_USELOCALE)
#check_symbol_exists(newlocale "locale.h" HAVE_NEWLOCALE)
#check_symbol_exists(freelocale "locale.h" HAVE_FREELOCALE)
if
(
BUILD_SHARED_LIBS
)
target_compile_definitions
(
${
libname
}
++ PRIVATE LIBCONFIG_STATIC
)
else
()
...
...
@@ -69,19 +65,35 @@ else()
target_compile_definitions
(
${
libname
}
++ PUBLIC LIBCONFIGXX_STATIC
)
endif
()
if
(
APPLE
)
check_symbol_exists
(
uselocale
"xlocale.h"
HAVE_USELOCALE
)
check_symbol_exists
(
newlocale
"xlocale.h"
HAVE_NEWLOCALE
)
check_symbol_exists
(
freelocale
"xlocale.h"
HAVE_FREELOCALE
)
else
()
check_symbol_exists
(
uselocale
"locale.h"
HAVE_USELOCALE
)
check_symbol_exists
(
newlocale
"locale.h"
HAVE_NEWLOCALE
)
check_symbol_exists
(
freelocale
"locale.h"
HAVE_FREELOCALE
)
endif
()
if
(
HAVE_USELOCALE
)
target_compile_definitions
(
${
libname
}
PRIVATE
"HAVE_USELOCALE"
)
target_compile_definitions
(
${
libname
}
PRIVATE
"HAVE_USELOCALE"
)
target_compile_definitions
(
${
libname
}
++
PRIVATE
"HAVE_USELOCALE"
)
endif
()
if
(
HAVE_NEWLOCALE
)
target_compile_definitions
(
${
libname
}
PRIVATE
"HAVE_NEWLOCALE"
)
target_compile_definitions
(
${
libname
}
PRIVATE
"HAVE_NEWLOCALE"
)
target_compile_definitions
(
${
libname
}
++
PRIVATE
"HAVE_NEWLOCALE"
)
endif
()
if
(
HAVE_FREELOCALE
)
target_compile_definitions
(
${
libname
}
PRIVATE
"HAVE_FREELOCALE"
)
target_compile_definitions
(
${
libname
}
PRIVATE
"HAVE_FREELOCALE"
)
target_compile_definitions
(
${
libname
}
++
PRIVATE
"HAVE_FREELOCALE"
)
endif
()
if
(
MSVC
)
...
...
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