Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
spdlog
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
spdlog
Commits
814c3445
Unverified
Commit
814c3445
authored
Jun 10, 2020
by
Gabi Melman
Committed by
GitHub
Jun 10, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1586 from podsvirov/fix-shared-non-msvc
Fix shared library building failure on Windows with non MSVC
parents
f593aad7
fe97a030
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
CMakeLists.txt
CMakeLists.txt
+5
-6
cmake/version.rc.in
cmake/version.rc.in
+1
-1
No files found.
CMakeLists.txt
View file @
814c3445
...
...
@@ -131,16 +131,15 @@ if(NOT SPDLOG_FMT_EXTERNAL AND NOT SPDLOG_FMT_EXTERNAL_HO)
list
(
APPEND SPDLOG_SRCS src/fmt.cpp
)
endif
()
if
(
WIN32 AND SPDLOG_BUILD_SHARED
)
list
(
APPEND SPDLOG_SRCS
${
CMAKE_CURRENT_BINARY_DIR
}
/version.rc
)
endif
()
if
(
SPDLOG_BUILD_SHARED
)
if
(
WIN32
)
configure_file
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake/version.rc.in
${
CMAKE_CURRENT_BINARY_DIR
}
/version.rc @ONLY
)
list
(
APPEND SPDLOG_SRCS
${
CMAKE_CURRENT_BINARY_DIR
}
/version.rc
)
endif
()
add_library
(
spdlog SHARED
${
SPDLOG_SRCS
}
${
SPDLOG_ALL_HEADERS
}
)
target_compile_definitions
(
spdlog PUBLIC SPDLOG_SHARED_LIB
)
if
(
WIN32
)
if
(
MSVC
)
target_compile_options
(
spdlog PUBLIC /wd4251 /wd4275
)
configure_file
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake/version.rc.in
${
CMAKE_CURRENT_BINARY_DIR
}
/version.rc @ONLY
)
endif
()
if
(
NOT SPDLOG_FMT_EXTERNAL AND NOT SPDLOG_FMT_EXTERNAL_HO
)
target_compile_definitions
(
spdlog PRIVATE FMT_EXPORT PUBLIC FMT_SHARED
)
...
...
cmake/version.rc.in
View file @
814c3445
#define APSTUDIO_READONLY_SYMBOLS
#include
"winres.h"
#include
<windows.h>
#undef APSTUDIO_READONLY_SYMBOLS
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
...
...
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