diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a9b38d..6863842 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,17 +8,17 @@ project(libOpenDrive VERSION 0.3.0 DESCRIPTION ".xodr library") set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED True) -set(CMAKE_CXX_FLAGS "-Wall") -set(CMAKE_CXX_FLAGS_RELEASE "-O3") - if(MSVC) -SET(CMAKE_CXX_FLAGS "/EHsc") -SET(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS 1) + set(CMAKE_CXX_FLAGS "/EHsc /Wall") + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS 1) + set(CMAKE_CXX_FLAGS_RELEASE "/O2") else() -set(CMAKE_CXX_FLAGS_DEBUG "-g") + set(CMAKE_CXX_FLAGS "-Wall") + set(CMAKE_CXX_FLAGS_DEBUG "-g") + set(CMAKE_CXX_FLAGS_RELEASE "-O3") endif() -SET (SOURCES +set(SOURCES src/Geometries/Arc.cpp src/Geometries/CubicSpline.cpp src/Geometries/Line.cpp @@ -41,19 +41,12 @@ SET (SOURCES thirdparty/pugixml/pugixml.cpp ) -add_library(OpenDrive SHARED ${SOURCES}) +add_library(OpenDrive ${SOURCES}) target_include_directories(OpenDrive PUBLIC $ $ $) -add_library(OpenDriveStatic STATIC ${SOURCES}) -target_include_directories(OpenDriveStatic - PUBLIC - $ $ - $) -set_target_properties(OpenDriveStatic PROPERTIES POSITION_INDEPENDENT_CODE ON) - add_executable(test-xodr test.cpp) target_link_libraries(test-xodr OpenDrive)