Skip to content

Commit

Permalink
fix(compilation): use private for scope of static libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
Milerius committed Sep 14, 2019
1 parent a32df71 commit caf4697
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
7 changes: 6 additions & 1 deletion examples/sfml/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,9 @@ if (EMSCRIPTEN)
message(STATUS "Local js compilation")
set_target_properties(antara-sfml-example PROPERTIES LINK_FLAGS "-s FORCE_FILESYSTEM=1 -s NODERAWFS=1 -s EXIT_RUNTIME=1")
endif ()
endif ()
endif ()

set_target_properties(antara-sfml-example
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/"
)
2 changes: 1 addition & 1 deletion modules/ecs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## shared sources between the module and his unit tests
add_library(antara_ecs_shared_sources STATIC)
target_sources(antara_ecs_shared_sources PUBLIC antara/gaming/ecs/base.system.cpp antara/gaming/ecs/system.manager.cpp)
target_sources(antara_ecs_shared_sources PRIVATE antara/gaming/ecs/base.system.cpp antara/gaming/ecs/system.manager.cpp)
target_include_directories(antara_ecs_shared_sources PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(antara_ecs_shared_sources PUBLIC EnTT strong_type expected range-v3 antara::refl-cpp antara::default_settings antara::timer antara::event)
add_library(antara::ecs ALIAS antara_ecs_shared_sources)
Expand Down
2 changes: 1 addition & 1 deletion modules/event/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## shared sources between the module and his unit tests
add_library(antara_event_shared_sources STATIC)
target_sources(antara_event_shared_sources PUBLIC antara/gaming/event/quit.game.cpp antara/gaming/event/fatal.error.cpp antara/gaming/event/key.pressed.cpp)
target_sources(antara_event_shared_sources PRIVATE antara/gaming/event/quit.game.cpp antara/gaming/event/fatal.error.cpp antara/gaming/event/key.pressed.cpp)
target_include_directories(antara_event_shared_sources PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(antara_event_shared_sources PUBLIC antara::default_settings antara::input)
add_library(antara::event ALIAS antara_event_shared_sources)
Expand Down
2 changes: 1 addition & 1 deletion modules/timer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## shared sources between the module and his unit tests
add_library(antara_timer_shared_sources STATIC)
target_sources(antara_timer_shared_sources PUBLIC antara/gaming/timer/time.step.cpp)
target_sources(antara_timer_shared_sources PRIVATE antara/gaming/timer/time.step.cpp)
target_include_directories(antara_timer_shared_sources PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(antara_timer_shared_sources PUBLIC antara::default_settings)
add_library(antara::timer ALIAS antara_timer_shared_sources)
Expand Down

0 comments on commit caf4697

Please sign in to comment.