Skip to content

Commit

Permalink
Renamed xeus-static target
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanMabille committed Mar 14, 2020
1 parent 479d196 commit 5d2c40e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -345,12 +345,12 @@ if (XEUS_BUILD_STATIC_LIBS)
# On Windows, a static library should use a different output name
# to avoid the conflict with the import library of a shared one.
if (CMAKE_HOST_WIN32)
xeus_create_target(xeus_static STATIC xeus_static)
xeus_create_target(xeus-static STATIC xeus-static)
else ()
xeus_create_target(xeus_static STATIC xeus)
xeus_create_target(xeus-static STATIC xeus)
endif ()

list(APPEND xeus_targets xeus_static)
list(APPEND xeus_targets xeus-static)
endif ()

# Tests
Expand Down
2 changes: 1 addition & 1 deletion example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ configure_file (

option(XEUS_STATIC_DEPENDENCIES "link statically with xeus dependencies" OFF)
if (XEUS_STATIC_DEPENDENCIES)
set(xeus_target "xeus_static")
set(xeus_target "xeus-static")
else ()
set(xeus_target "xeus")
endif ()
Expand Down
4 changes: 2 additions & 2 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ endif()
if (TARGET xeus)
set(xeus_TARGET xeus)
message("Found xeus shared library.")
elseif (TARGET xeus_static)
set(xeus_TARGET xeus_static)
elseif (TARGET xeus-static)
set(xeus_TARGET xeus-static)
message("Found xeus static library.")
endif ()

Expand Down
13 changes: 7 additions & 6 deletions xeusConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# xeus_FOUND - true if xeus found on the system
# xeus_INCLUDE_DIRS - the directory containing xeus headers
# xeus_LIBRARY - the library for dynamic linking
# xeus_STATIC_LIBRARY - the library for static linking

@PACKAGE_INIT@

Expand Down Expand Up @@ -44,19 +45,19 @@ endif()

find_dependency(OpenSSL)

if(NOT TARGET xeus AND NOT TARGET xeus_static)
if(NOT TARGET xeus AND NOT TARGET xeus-static)
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")

if (TARGET xeus AND TARGET xeus_static)
if (TARGET xeus AND TARGET xeus-static)
get_target_property(@PROJECT_NAME@_INCLUDE_DIR xeus INTERFACE_INCLUDE_DIRECTORIES)
get_target_property(@PROJECT_NAME@_LIBRARY xeus LOCATION)
get_target_property(@PROJECT_NAME@_STATIC_LIBRARY xeus_static LOCATION)
get_target_property(@PROJECT_NAME@_STATIC_LIBRARY xeus-static LOCATION)
elseif (TARGET xeus)
get_target_property(@PROJECT_NAME@_INCLUDE_DIR xeus INTERFACE_INCLUDE_DIRECTORIES)
get_target_property(@PROJECT_NAME@_LIBRARY xeus LOCATION)
elseif (TARGET xeus_static)
get_target_property(@PROJECT_NAME@_INCLUDE_DIR xeus_static INTERFACE_INCLUDE_DIRECTORIES)
get_target_property(@PROJECT_NAME@_STATIC_LIBRARY xeus_static LOCATION)
elseif (TARGET xeus-static)
get_target_property(@PROJECT_NAME@_INCLUDE_DIR xeus-static INTERFACE_INCLUDE_DIRECTORIES)
get_target_property(@PROJECT_NAME@_STATIC_LIBRARY xeus-static LOCATION)
set(@PROJECT_NAME@_LIBRARY ${@PROJECT_NAME@_STATIC_LIBRARY})
endif ()
endif()

0 comments on commit 5d2c40e

Please sign in to comment.