Loading CMakeLists.txt +10 −7 Original line number Diff line number Diff line project(libconfplus) cmake_minimum_required(VERSION 3.00) cmake_minimum_required(VERSION 3.10) set(WINDOWS_EXPORT_ALL_SYMBOLS ON) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake") if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows") set(CMAKE_INSTALL_PREFIX ON CACHE PATH "c:/Program Files/libconfplus") set(CMAKE_CXX_FLAGS "/EHsc" ) else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \ -fPIC \ -Wall" ) if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows") set(CMAKE_INSTALL_PREFIX ON CACHE PATH "c:/Program Files/libconfplus") endif() add_definitions(-D${CMAKE_SYSTEM_NAME}) Loading backends/CMakeLists.txt +9 −7 Original line number Diff line number Diff line Loading @@ -5,21 +5,23 @@ include_directories( find_package(YAML REQUIRED) if(${YAML_FOUND}) set( yamlsrc yaml/yaml.cpp set( yamlconfsrc "yaml/yamlconf.cpp" ) add_library(yamlconf SHARED ${yamlsrc}) add_library(yamlconf SHARED ${yamlconfsrc}) add_dependencies(yamlconf confplus) set_target_properties(yamlconf PROPERTIES PREFIX "") set_target_properties(yamlconf PROPERTIES OUTPUT_NAME yaml) target_include_directories(yamlconf PUBLIC ${YAML_INCLUDE_DIR}) target_include_directories(yamlconf PRIVATE ${YAML_INCLUDE_DIR}) if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows") target_link_libraries(yamlconf PUBLIC confplus ${YAML_LIBRARIES} kernel32.lib) if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows") target_link_libraries(yamlconf PUBLIC confplus PRIVATE ${YAML_LIBRARIES} kernel32.lib ) else() target_link_libraries(yamlconf PUBLIC confplus ${YAML_LIBRARIES} dl) target_link_libraries(yamlconf PUBLIC confplus PRIVATE ${YAML_LIBRARIES} dl) endif() install(TARGETS yamlconf DESTINATION lib/confplus/backend) Loading backends/yaml/yaml.cpp→backends/yaml/yamlconf.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -26,11 +26,11 @@ *******************************************************************************/ #include <iostream> #include <string> #include <yaml.h> #include "conf.h" #include "yaml.h" #include "yamlconf.h" #include "exception.h" namespace confplus { struct YamlStack { Loading backends/yaml/yaml.h→backends/yaml/yamlconf.h +1 −2 Original line number Diff line number Diff line Loading @@ -25,8 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *******************************************************************************/ #include <yaml.h> #include "conf.h" #include "backend.h" namespace confplus { Loading config.h.in +1 −1 Original line number Diff line number Diff line #ifdef Windows #define CONFIGPATH "%PROGRAMFILES%\libconfplus\lib\confplus\backend" #define CONFIGPATH ".\lib\\confplus\\backend" #else #define CONFIGPATH "${CMAKE_INSTALL_PREFIX}/lib/confplus/backend" #endif No newline at end of file Loading
CMakeLists.txt +10 −7 Original line number Diff line number Diff line project(libconfplus) cmake_minimum_required(VERSION 3.00) cmake_minimum_required(VERSION 3.10) set(WINDOWS_EXPORT_ALL_SYMBOLS ON) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake") if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows") set(CMAKE_INSTALL_PREFIX ON CACHE PATH "c:/Program Files/libconfplus") set(CMAKE_CXX_FLAGS "/EHsc" ) else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \ -fPIC \ -Wall" ) if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows") set(CMAKE_INSTALL_PREFIX ON CACHE PATH "c:/Program Files/libconfplus") endif() add_definitions(-D${CMAKE_SYSTEM_NAME}) Loading
backends/CMakeLists.txt +9 −7 Original line number Diff line number Diff line Loading @@ -5,21 +5,23 @@ include_directories( find_package(YAML REQUIRED) if(${YAML_FOUND}) set( yamlsrc yaml/yaml.cpp set( yamlconfsrc "yaml/yamlconf.cpp" ) add_library(yamlconf SHARED ${yamlsrc}) add_library(yamlconf SHARED ${yamlconfsrc}) add_dependencies(yamlconf confplus) set_target_properties(yamlconf PROPERTIES PREFIX "") set_target_properties(yamlconf PROPERTIES OUTPUT_NAME yaml) target_include_directories(yamlconf PUBLIC ${YAML_INCLUDE_DIR}) target_include_directories(yamlconf PRIVATE ${YAML_INCLUDE_DIR}) if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows") target_link_libraries(yamlconf PUBLIC confplus ${YAML_LIBRARIES} kernel32.lib) if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows") target_link_libraries(yamlconf PUBLIC confplus PRIVATE ${YAML_LIBRARIES} kernel32.lib ) else() target_link_libraries(yamlconf PUBLIC confplus ${YAML_LIBRARIES} dl) target_link_libraries(yamlconf PUBLIC confplus PRIVATE ${YAML_LIBRARIES} dl) endif() install(TARGETS yamlconf DESTINATION lib/confplus/backend) Loading
backends/yaml/yaml.cpp→backends/yaml/yamlconf.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -26,11 +26,11 @@ *******************************************************************************/ #include <iostream> #include <string> #include <yaml.h> #include "conf.h" #include "yaml.h" #include "yamlconf.h" #include "exception.h" namespace confplus { struct YamlStack { Loading
backends/yaml/yaml.h→backends/yaml/yamlconf.h +1 −2 Original line number Diff line number Diff line Loading @@ -25,8 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *******************************************************************************/ #include <yaml.h> #include "conf.h" #include "backend.h" namespace confplus { Loading
config.h.in +1 −1 Original line number Diff line number Diff line #ifdef Windows #define CONFIGPATH "%PROGRAMFILES%\libconfplus\lib\confplus\backend" #define CONFIGPATH ".\lib\\confplus\\backend" #else #define CONFIGPATH "${CMAKE_INSTALL_PREFIX}/lib/confplus/backend" #endif No newline at end of file