diff --git a/CMakeLists.txt b/CMakeLists.txt index 0edaa505..c7337fd8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.17.0) -project(kompute VERSION 0.1.0) +project(kompute VERSION 0.3.0) set(CMAKE_CXX_STANDARD 17) @@ -9,7 +9,6 @@ set(CMAKE_VERBOSE_MAKEFILE on) # Enable or disable targets option(KOMPUTE_OPT_BUILD_TESTS "Enable if you want to build tests" 1) option(KOMPUTE_OPT_BUILD_DOCS "Enable if you want to build documentation" 1) -option(KOMPUTE_OPT_DEBUG_SYMBOLS "Enable if you want to build debug with symbols" 0) option(KOMPUTE_OPT_ENABLE_SPDLOG "Extra compile flags for Kompute, see docs for full list" 1) set(KOMPUTE_EXTRA_CXX_FLAGS "" CACHE STRING "Extra compile flags for Kompute, see docs for full list") diff --git a/Makefile b/Makefile index b8c6600a..7b73a3f5 100755 --- a/Makefile +++ b/Makefile @@ -41,12 +41,14 @@ clean_cmake: ####### Visual studio build shortcut commands ####### MK_BUILD_TYPE ?= "Release" +MK_INSTALL_PATH ?= "build/src/CMakeFiles/Export/" # Set to "" if prefer default mk_cmake: cmake \ -Bbuild \ -DCMAKE_BUILD_TYPE=$(MK_BUILD_TYPE) \ -DKOMPUTE_OPT_BUILD_DOCS=0 \ + -DCMAKE_INSTALL_PREFIX=$(MK_INSTALL_PATH) \ -DCMAKE_TOOLCHAIN_FILE=$(VCPKG_UNIX_PATH) \ -DCMAKE_EXPORT_COMPILE_COMMANDS=1 \ -G "Unix Makefiles" @@ -74,7 +76,9 @@ mk_run_tests: mk_build_tests VS_BUILD_TYPE ?= "Debug" # Run with multiprocessin / parallel build by default -VS_CMAKE_EXTRA_FLAGS ?= "/MP" +VS_CMAKE_EXTRA_FLAGS ?= "" +VS_KOMPUTE_EXTRA_CXX_FLAGS ?= "/MP" +VS_INSTALL_PATH ?= "build/src/CMakeFiles/Export/" # Set to "" if prefer default vs_cmake: $(CMAKE_BIN) \ @@ -82,7 +86,10 @@ vs_cmake: -DCMAKE_TOOLCHAIN_FILE=$(VCPKG_WIN_PATH) \ -DCMAKE_EXPORT_COMPILE_COMMANDS=1 \ $(VS_CMAKE_EXTRA_FLAGS) \ + -DKOMPUTE_EXTRA_CXX_FLAGS=$(VS_KOMPUTE_EXTRA_CXX_FLAGS) \ + -DCMAKE_INSTALL_PREFIX=$(VS_INSTALL_PATH) \ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ + -DCMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD=ON \ -G "Visual Studio 16 2019" vs_build_all: @@ -91,6 +98,9 @@ vs_build_all: vs_build_docs: $(MSBUILD_BIN) build/docs/gendocsall.vcxproj -p:Configuration=$(VS_BUILD_TYPE) +vs_install_kompute: + $(MSBUILD_BIN) build/src/INSTALL.vcxproj -p:Configuration=$(VS_BUILD_TYPE) + vs_build_kompute: $(MSBUILD_BIN) build/src/kompute.vcxproj -p:Configuration=$(VS_BUILD_TYPE) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e9f13ee0..662deefe 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -46,7 +46,6 @@ add_dependencies(kompute add_library(kompute::kompute ALIAS kompute) - install(TARGETS kompute EXPORT KomputeTargets LIBRARY DESTINATION lib ARCHIVE DESTINATION lib @@ -54,8 +53,11 @@ install(TARGETS kompute EXPORT KomputeTargets install(DIRECTORY include/ DESTINATION include) +install(DIRECTORY ${PROJECT_SOURCE_DIR}/single_include/ + DESTINATION include) + install(EXPORT KomputeTargets - FILE KomputeTargets.cmake - NAMESPACE kp:: + FILE komputeConfig.cmake + NAMESPACE kompute:: DESTINATION lib/cmake/kompute)