Refactor CMakeLists for theoretical Win32 support
All checks were successful
Build Docs With Doxygen / Explore-Gitea-Actions (push) Successful in 1m9s
All checks were successful
Build Docs With Doxygen / Explore-Gitea-Actions (push) Successful in 1m9s
This commit is contained in:
@@ -10,9 +10,6 @@ endif()
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
#set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
if (WIN32)
|
||||
set(CMAKE_CXX_FLAGS "-municode")
|
||||
endif(WIN32)
|
||||
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||
@@ -30,6 +27,9 @@ include_directories("include")
|
||||
|
||||
add_library(J3ML SHARED ${J3ML_SRC})
|
||||
set_target_properties(J3ML PROPERTIES LINKER_LANGUAGE CXX)
|
||||
if(WIN32)
|
||||
target_compile_options(J3ML PRIVATE -Wno-multichar)
|
||||
endif()
|
||||
|
||||
install(TARGETS ${PROJECT_NAME} DESTINATION lib/${PROJECT_NAME})
|
||||
|
||||
@@ -38,4 +38,8 @@ install(FILES ${J3ML_HEADERS} DESTINATION include/${PROJECT_NAME})
|
||||
add_subdirectory(tests)
|
||||
|
||||
add_executable(MathDemo main.cpp)
|
||||
target_link_libraries(MathDemo ${PROJECT_NAME})
|
||||
target_link_libraries(MathDemo ${PROJECT_NAME})
|
||||
|
||||
if(WIN32)
|
||||
target_compile_options(MathDemo PRIVATE -mwindows)
|
||||
endif()
|
Reference in New Issue
Block a user