Skip to content

Commit

Permalink
Fixed install paths (headers & stlink-gui.ui)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nightwalker-87 committed Jun 28, 2020
1 parent fc56f24 commit 31b1fa1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ include_directories(src/st-flash)
include_directories(src/stlink-lib)

## Set installation directory for header files
set(STLINK_INCLUDE_PATH ${CMAKE_INSTALL_INCLUDEDIR} CACHE PATH "Main include install directory")
set(STLINK_INCLUDE_PATH ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME} CACHE PATH "Main include install directory")

## Subordinate CMakeLists for version config & header installation
add_subdirectory(inc)
Expand Down Expand Up @@ -147,7 +147,7 @@ endif ()
set(STLINK_LIBRARY_PATH ${CMAKE_INSTALL_LIBDIR} CACHE PATH "Main library install directory")

# Set the environment variable LD_LIBRARY_PATH to point to /usr/local/lib (per default).
execute_process (COMMAND bash -c "export LD_LIBRARY_PATH=${CMAKE_INSTALL_LIBDIR}")
execute_process(COMMAND bash -c "export LD_LIBRARY_PATH=${CMAKE_INSTALL_LIBDIR}")


###
Expand Down
4 changes: 2 additions & 2 deletions src/stlink-gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ if (NOT WIN32 AND NOT CMAKE_CROSSCOMPILING)

## stlink-gui
add_executable(stlink-gui ${GUI_SOURCES})
install(FILES stlink-gui.ui DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES stlink-gui.ui DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME})
set_target_properties(stlink-gui PROPERTIES
COMPILE_DEFINITIONS STLINK_UI_DIR="${CMAKE_INSTALL_PREFIX}/bin")
COMPILE_DEFINITIONS STLINK_UI_DIR="${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}")
target_link_libraries(stlink-gui ${STLINK_LIB_SHARED} ${SSP_LIB} ${GTK3_LDFLAGS})
install(TARGETS stlink-gui DESTINATION ${CMAKE_INSTALL_BINDIR})
endif ()
Expand Down

0 comments on commit 31b1fa1

Please sign in to comment.