Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[22341] Fix cmake generator evaluation (backport #251) #252

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions src/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ if(APPLE)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
endif()

<<<<<<< HEAD
# Create libraries
if(MSVC OR MSVC_IDE AND EPROSIMA_INSTALLER AND IS_TOP_LEVEL)
generate_msvc_libraries(i86Win32VS2013)
Expand All @@ -49,6 +50,32 @@ elseif(NOT EPROSIMA_INSTALLER)
# Create library
add_library(${PROJECT_NAME} ${${PROJECT_NAME}_SOURCES})
set_common_compile_options(${PROJECT_NAME})
=======
# Create library
add_library(${PROJECT_NAME} ${${PROJECT_NAME}_source_files})
set_common_compile_options(${PROJECT_NAME})
set_target_properties(${PROJECT_NAME} PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_VERSION_MAJOR}
)

target_compile_definitions(${PROJECT_NAME}
PRIVATE
${PROJECT_NAME_UPPER}_SOURCE
INTERFACE
$<$<BOOL:${WIN32}>:${PROJECT_NAME_UPPER}_NO_LIB>
PUBLIC
$<$<TARGET_EXISTS:${PROJECT_NAME}>:$<$<STREQUAL:$<TARGET_PROPERTY:${PROJECT_NAME},TYPE>,SHARED_LIBRARY>:${PROJECT_NAME_UPPER}_DYN_LINK>>
)

# Define public headers
target_include_directories(${PROJECT_NAME} PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
$<INSTALL_INTERFACE:${INCLUDE_INSTALL_DIR}>
)

if(MSVC OR MSVC_IDE)
>>>>>>> 0cb11a4 (Fix cmake generator evaluation (#251))
set_target_properties(${PROJECT_NAME} PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_VERSION_MAJOR}
Expand Down
Loading