Reputation: 2165
Trying to convert a makefile project to CMake. In my makefile I have something like this:
MY_PATH := ../../../../..
LOCAL_SRC_FILES := main.cpp \
$(MY_PATH)/AlertIcon.cpp
but the following doesn't work in CMake:
set(MY_PATH, "${CMAKE_SOURCE_DIR}/../../../../..")
add_library(mylib SHARED
main.cpp
${MY_PATH}/AlertIcon.cpp)
What is the proper syntax?
Upvotes: 0
Views: 77
Reputation: 1223
In set(MY_PATH "${CMAKE_SOURCE_DIR}/../../../../..")
it should be no comma between arguments.
See documentation.
Also, you can use message(${MY_PATH})
to "debug" variable values.
Upvotes: 2