✨ Added install target
This commit is contained in:
		| @@ -42,6 +42,16 @@ endif () | |||||||
| add_dependencies(moReader moFileReader) | add_dependencies(moReader moFileReader) | ||||||
| target_link_libraries(moReader moFileReader) | target_link_libraries(moReader moFileReader) | ||||||
|  |  | ||||||
|  | install(TARGETS moReader  | ||||||
|  | 	RUNTIME DESTINATION bin | ||||||
|  | ) | ||||||
|  | install(TARGETS moFileReader  | ||||||
|  | 	LIBRARY DESTINATION lib | ||||||
|  | 	ARCHIVE DESTINATION lib | ||||||
|  | 	PUBLIC_HEADER DESTINATION include | ||||||
|  | ) | ||||||
|  | install(DIRECTORY ${CMAKE_SOURCE_DIR}/include/ DESTINATION include/) | ||||||
|  |  | ||||||
| option(BUILD_TEST "Set this to ON if you want to build the test" OFF) | option(BUILD_TEST "Set this to ON if you want to build the test" OFF) | ||||||
|  |  | ||||||
| if(BUILD_TEST) | if(BUILD_TEST) | ||||||
|   | |||||||
							
								
								
									
										11
									
								
								conanfile.py
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								conanfile.py
									
									
									
									
									
								
							| @@ -8,9 +8,6 @@ class MofilereaderConan(ConanFile): | |||||||
|     url = "https://github.com/AnotherFoxGuy/conan-MofileReader/" |     url = "https://github.com/AnotherFoxGuy/conan-MofileReader/" | ||||||
|     description = "This API lets you read .mo-Files and use their content just as you would do with GNUs gettext." |     description = "This API lets you read .mo-Files and use their content just as you would do with GNUs gettext." | ||||||
|     settings = "os", "compiler", "build_type", "arch" |     settings = "os", "compiler", "build_type", "arch" | ||||||
|     #options = {"shared": [True, False]} |  | ||||||
|     #default_options = "shared=False" |  | ||||||
|     generators = "cmake" |  | ||||||
|     exports_sources = "include*", "src*", "CMakeLists.txt" |     exports_sources = "include*", "src*", "CMakeLists.txt" | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -20,12 +17,8 @@ class MofilereaderConan(ConanFile): | |||||||
|         cmake.build() |         cmake.build() | ||||||
|  |  | ||||||
|     def package(self): |     def package(self): | ||||||
|         self.copy("*.h", dst="include", src="include") |         cmake = CMake(self) | ||||||
|         self.copy("*.lib", dst="lib", keep_path=False) |         cmake.install() | ||||||
|         self.copy("*.dll", dst="bin", keep_path=False) |  | ||||||
|         self.copy("*.so", dst="lib", keep_path=False) |  | ||||||
|         self.copy("*.dylib", dst="lib", keep_path=False) |  | ||||||
|         self.copy("*.a", dst="lib", keep_path=False) |  | ||||||
|  |  | ||||||
|     def package_info(self): |     def package_info(self): | ||||||
|         self.cpp_info.libs = tools.collect_libs(self) |         self.cpp_info.libs = tools.collect_libs(self) | ||||||
|   | |||||||
| @@ -9,7 +9,7 @@ using namespace moFileLib; | |||||||
|  |  | ||||||
| TEST_CASE ("Load mo-file", "[ReadFile]") | TEST_CASE ("Load mo-file", "[ReadFile]") | ||||||
| { | { | ||||||
| 	CHECK (moFileReaderSingleton::GetInstance().ReadFile("test.mo") == moFileLib::moFileReader::EC_SUCCESS); |     CHECK (moFileReaderSingleton::GetInstance ().ReadFile ("test.mo") == moFileLib::moFileReader::EC_SUCCESS); | ||||||
| } | } | ||||||
|  |  | ||||||
| TEST_CASE ("Lookup string", "[Lookup]") | TEST_CASE ("Lookup string", "[Lookup]") | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user