Skip to content

Commit

Permalink
Simply the installation rule for target libcsmith_so.
Browse files Browse the repository at this point in the history
There's no need for an explicit platform test; just specify data for
both LIBRARY and RUNTIME "target kinds" in a single command.
  • Loading branch information
eeide committed May 22, 2017
1 parent 194df7a commit 025a76a
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions runtime/CMakeLists.txt
Expand Up @@ -51,8 +51,7 @@ add_library(libcsmith_a STATIC
set_target_properties(libcsmith_a PROPERTIES OUTPUT_NAME "csmith")

install(TARGETS libcsmith_a
ARCHIVE
DESTINATION "${LIB_DIR}"
ARCHIVE DESTINATION "${LIB_DIR}"
)

#####
Expand All @@ -69,17 +68,13 @@ set_target_properties(libcsmith_so PROPERTIES OUTPUT_NAME "csmith")
# installs (for Linux). This is probably not very useful.
set_target_properties(libcsmith_so PROPERTIES VERSION 0.0.0 SOVERSION 0)

if(WIN32)
# Linux, OS X, FreeBSD et al. look for the LIBRARY specification.
# Windows ("DLL platforms") looks for the RUNTIME specification.
# See, e.g., https://stackoverflow.com/questions/14990343/cmake-error-targets-given-no-library-destination-for-shared-library-target
install(TARGETS libcsmith_so
RUNTIME
DESTINATION "${LIB_DIR}"
LIBRARY DESTINATION "${LIB_DIR}"
RUNTIME DESTINATION "${LIB_DIR}"
)
else()
install(TARGETS libcsmith_so
LIBRARY
DESTINATION "${LIB_DIR}"
)
endif()

###############################################################################

Expand Down

0 comments on commit 025a76a

Please sign in to comment.