Skip to content

Commit

Permalink
Cmake does not support bundling convenience libraries within a shared…
Browse files Browse the repository at this point in the history
… library without jumping through hoops. Just list the sources twice for the static and shared libs.
  • Loading branch information
tskisner committed Nov 11, 2019
1 parent d0cc710 commit f6228f9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 28 deletions.
26 changes: 0 additions & 26 deletions src/libaatm/ATM.cpp

This file was deleted.

8 changes: 6 additions & 2 deletions src/libaatm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,13 @@ target_include_directories(${AATM_LIB} PUBLIC

# Now define rules for the shared library

add_library(${AATM_MOD} SHARED ATM.cpp)
add_library(${AATM_MOD} SHARED ${AATM_SOURCES})

target_link_libraries(${AATM_MOD} PRIVATE ${AATM_LIB})
target_include_directories(${AATM_MOD} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
PRIVATE .
)

install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})

Expand Down

0 comments on commit f6228f9

Please sign in to comment.