Skip to content

Commit

Permalink
Install shared library into same dir as non-cmake, fix cmake install …
Browse files Browse the repository at this point in the history
…command to actually work
  • Loading branch information
timkpaine committed Dec 15, 2023
1 parent 3425b9c commit 5c76df3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 deletions.
22 changes: 3 additions & 19 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ endif(NOT CMAKE_BUILD_TYPE)

set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" ${CMAKE_MODULE_PATH})

set(INSTALL_DIR ${PROJECT_SOURCE_DIR}/install)
set(INSTALL_DIR ${PROJECT_SOURCE_DIR}/out/current)

option(
WITH_LIBCXX
Expand Down Expand Up @@ -318,21 +318,5 @@ target_include_directories(synlig PUBLIC $<BUILD_INTERFACE:${JSON_INCLUDE_DIR}>
target_include_directories(synlig PUBLIC $<BUILD_INTERFACE:${YOSYS_INCLUDE_DIR}>
$<INSTALL_INTERFACE:include>)

include(GNUInstallDirs)

# Generate cmake config files for reuse by downstream packages
include(CMakePackageConfigHelpers)

install(FILES ${CMAKE_CURRENT_BINARY_DIR}/SynligConfig.cmake
${CMAKE_CURRENT_BINARY_DIR}/SynligConfigVersion.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Synlig)

# install the configuration file
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Synlig.pc DESTINATION lib/pkgconfig)

add_custom_target(
synlig_link_target ALL
COMMAND
${CMAKE_COMMAND} -E create_symlink
${CMAKE_CURRENT_BINARY_DIR}/compile_commands.json
${PROJECT_SOURCE_DIR}/compile_commands.json)
# Install library using normal shell script
install(CODE "execute_process(COMMAND ${CMAKE_SOURCE_DIR}/install_plugin.sh)")
2 changes: 1 addition & 1 deletion install_plugin.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/env bash
#!/usr/bin/env bash

set -e

Expand Down

0 comments on commit 5c76df3

Please sign in to comment.