mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-04 21:30:01 -05:00
1edf138506
For policy-specific tests, use the version before the policy was introduced. Otherwise, use 3.5 where possible. Also, remove `cmake_minimum_required()` and `project()` calls from individual cases where they are handled by `CMakeLists.txt`.
14 lines
397 B
CMake
14 lines
397 B
CMake
cmake_policy(SET CMP0068 NEW)
|
|
enable_language(C)
|
|
|
|
set(CMAKE_BUILD_WITH_INSTALL_RPATH 1)
|
|
add_library(mylib SHARED obj1.c)
|
|
add_executable(myexe testobj1.c)
|
|
target_link_libraries(myexe mylib)
|
|
set_property(TARGET myexe PROPERTY INSTALL_RPATH "${CMAKE_CURRENT_BINARY_DIR}/root-all/bin")
|
|
set_target_properties(mylib PROPERTIES VERSION 1.0 SOVERSION 1)
|
|
|
|
install(TARGETS mylib myexe
|
|
DESTINATION bin
|
|
)
|