install config in other folder win

This commit is contained in:
lukas 2020-05-18 19:46:19 +02:00
parent 826386e849
commit a356bca964

View File

@ -18,8 +18,8 @@ SET(LIB_METHOD STATIC) #SHARED / STATIC
option(BUILD_DOC "Build documentation" ON) # additional dependency for Doxygen option(BUILD_DOC "Build documentation" ON) # additional dependency for Doxygen
option(PACKAGING "Allow Packaging to <exe>, <deb> or <rpm>" ON) # additional dependencies for RPMbuild,dpkg or NSIS option(PACKAGING "Allow Packaging to <exe>, <deb> or <rpm>" ON) # additional dependencies for RPMbuild,dpkg or NSIS
option(TESTS "Build Tests" ON) # additional dependencies for GTEST - to build tests option(TESTS "Build Tests" false) # additional dependencies for GTEST - to build tests
set(WinBuild false) set(WinBuild true)
# helper variables # helper variables
SET(CMAKE_CXX_STANDARD 17) SET(CMAKE_CXX_STANDARD 17)
@ -65,7 +65,7 @@ if (${WinBuild})
# or add_definitions(-DCURL_STATICLIB) # or add_definitions(-DCURL_STATICLIB)
# windows config path is same as executable # windows config path is same as executable
set(CONFIG_PATH "./iprefresher.cfg") set(CONFIG_PATH "../Common Files/iprefresher/iprefresher.cfg")
else () else ()
set(LIBSUFFIX .so) set(LIBSUFFIX .so)
set(SUFFIX "") set(SUFFIX "")
@ -188,6 +188,9 @@ ELSE ()
set_target_properties(iprefresher PROPERTIES SUFFIX ".exe") set_target_properties(iprefresher PROPERTIES SUFFIX ".exe")
install(TARGETS iprefresher DESTINATION .) install(TARGETS iprefresher DESTINATION .)
# create config directory
install(DIRECTORY DESTINATION "../Common\ Files/iprefresher")
# install .dll dependencies # install .dll dependencies
# todo check if files exist... # todo check if files exist...
install(FILES /usr/${TOOLCHAIN_PREFIX}/sys-root/mingw/bin/libcurl-4.dll install(FILES /usr/${TOOLCHAIN_PREFIX}/sys-root/mingw/bin/libcurl-4.dll