Skip to content

Commit

Permalink
Flatten package archive structure - use existing script on new target…
Browse files Browse the repository at this point in the history
…s in libs.

CMakeLists.txt - define a variable for "flatten" script location
libs - run the script on new targets
.travis.yml - revert NEKOPATH change, it is not needed with flat archive
  • Loading branch information
ppenzin committed Feb 24, 2017
1 parent 97b8a0f commit a322c60
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ install:
make source_archive_fat &&
tar xf bin/neko-*-${TRAVIS_OS_NAME}*.tar.gz &&
cd neko-*-${TRAVIS_OS_NAME}* &&
export PATH=`pwd`:$PATH &&
export NEKOPATH=$LD_LIBRARY_PATH:`pwd`/lib/neko;
export PATH=`pwd`:$PATH;
else
sudo make install;
fi
Expand Down
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -679,12 +679,14 @@ if (RUN_LDCONFIG)
install(SCRIPT "${CMAKE_SOURCE_DIR}/cmake/ldconfig.cmake")
endif()

# A script to create a flat installation for archive package
set (NEKO_FLATTEN_SCRIPT ${CMAKE_BINARY_DIR}/cmake/flatten.cmake)
configure_file(
"${CMAKE_SOURCE_DIR}/cmake/flatten.cmake.in"
"${CMAKE_BINARY_DIR}/cmake/flatten.cmake"
${NEKO_FLATTEN_SCRIPT}
IMMEDIATE @ONLY)

install(SCRIPT "${CMAKE_BINARY_DIR}/cmake/flatten.cmake")
install(SCRIPT ${NEKO_FLATTEN_SCRIPT})

# uninstall target
configure_file(
Expand Down
1 change: 1 addition & 0 deletions libs/mod_neko/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ install (
DESTINATION ${DEST_NDLL}
)

install(SCRIPT ${NEKO_FLATTEN_SCRIPT})
2 changes: 2 additions & 0 deletions libs/mod_tora/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,5 @@ install (
TARGETS mod_tora2.ndll
DESTINATION ${DEST_NDLL}
)

install(SCRIPT ${NEKO_FLATTEN_SCRIPT})
2 changes: 2 additions & 0 deletions libs/mysql/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,5 @@ install (
TARGETS mysql.ndll mysql5.ndll
DESTINATION ${DEST_NDLL}
)

install(SCRIPT ${NEKO_FLATTEN_SCRIPT})
2 changes: 2 additions & 0 deletions libs/regexp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,5 @@ install (
TARGETS regexp.ndll
DESTINATION ${DEST_NDLL}
)

install(SCRIPT ${NEKO_FLATTEN_SCRIPT})
2 changes: 2 additions & 0 deletions libs/sqlite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,5 @@ install (
TARGETS sqlite.ndll
DESTINATION ${DEST_NDLL}
)

install(SCRIPT ${NEKO_FLATTEN_SCRIPT})
2 changes: 2 additions & 0 deletions libs/ssl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,5 @@ install (
TARGETS ssl.ndll
DESTINATION ${DEST_NDLL}
)

install(SCRIPT ${NEKO_FLATTEN_SCRIPT})
2 changes: 2 additions & 0 deletions libs/std/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,5 @@ install (
TARGETS std.ndll
DESTINATION ${DEST_NDLL}
)

install(SCRIPT ${NEKO_FLATTEN_SCRIPT})
2 changes: 2 additions & 0 deletions libs/ui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ install (
TARGETS ui.ndll
DESTINATION ${DEST_NDLL}
)

install(SCRIPT ${NEKO_FLATTEN_SCRIPT})
2 changes: 2 additions & 0 deletions libs/zlib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,5 @@ install (
TARGETS zlib.ndll
DESTINATION ${DEST_NDLL}
)

install(SCRIPT ${NEKO_FLATTEN_SCRIPT})

0 comments on commit a322c60

Please sign in to comment.