Browse Source

Export symbols when building shared library; minor misc fixes

master
Jessica James 3 years ago
parent
commit
467e2b8853
  1. 3
      src/common/CMakeLists.txt
  2. 2
      src/common/io/command_manager.cpp
  3. 2
      src/test/app_parameters.cpp

3
src/common/CMakeLists.txt

@ -5,6 +5,9 @@ set(SOURCE_FILES
# Setup library build target # Setup library build target
add_library(jessilib ${SOURCE_FILES}) add_library(jessilib ${SOURCE_FILES})
# Ensure all symbols are exported by default on Windows, to avoid littering dllexport everywhere
set_target_properties(jessilib PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)
# Setup include directories # Setup include directories
target_include_directories(jessilib PUBLIC ../include) target_include_directories(jessilib PUBLIC ../include)
target_include_directories(jessilib PRIVATE ../include/jessilib) target_include_directories(jessilib PRIVATE ../include/jessilib)

2
src/common/io/command_manager.cpp

@ -28,7 +28,7 @@ void command_manager::register_command(basic_command& in_command) {
void command_manager::unregister_command(basic_command& in_command) { void command_manager::unregister_command(basic_command& in_command) {
std::lock_guard<std::shared_mutex> guard{ m_commands_mutex }; std::lock_guard<std::shared_mutex> guard{ m_commands_mutex };
std::remove(m_commands.begin(), m_commands.end(), &in_command); std::erase(m_commands, &in_command);
} }
bool command_manager::execute_command(command_context& in_context) { bool command_manager::execute_command(command_context& in_context) {

2
src/test/app_parameters.cpp

@ -44,7 +44,7 @@ public:
} }
int argc() const { int argc() const {
return m_args.size(); return static_cast<int>(m_args.size());
} }
private: private:

Loading…
Cancel
Save